I have a MySQL database in my php page that is a repeating field. The raw data being entered into the database is: <a href="http://www.link.com/">Link</a>
The code in my page works fine, but when I click on it in the browser, I need it to open in a _blank window. I know it's probably simple, but I cant find the answer anywhere.
My code on the page is: <?php echo $row_rsManufacturers['manufacturer']; ?>
How do I change it to open in a blank window?
Thanks
In order to open a link in a new window you must add the target attribute.
<a href="http://www.link.com/" target="_blank"> Link</a>
Modify the links in the database to use the target attribute.
I found it.
I changed my database to have only the www address and wrapped my code around the following and it works.
<?php
if($row_rsDatabaseTable['databasefield'] != "") { ?>
<a href="http://<?php echo $row_rsDatabaseTable['databasefield']; ?>" target="_blank"><?php echo $row_rsDatabaseTable['databasefield']; ?></a>
Thanks!