Jump to content

not showing link in the database


sandbudd

Recommended Posts

Hey guys it displays the image great and does the hyperlink but shows http:/// instead of the link that is in the database?

 


<?php echo '<a href="' . $row['headerlink'] . '"  target="_blank" border="0">'; echo "<img width='940px' height='165px' src= images/".$row['header'] ."> "; ?>

Link to comment
https://forums.phpfreaks.com/topic/184083-not-showing-link-in-the-database/
Share on other sites

here is the complete file and like I said it displays the image fine just not the link?

 



<?
// Connect database.
$host=""; // Host name.
$db_user=""; // MySQL username.
$db_password=""; // MySQL password.
$database=""; // Database name.
mysql_connect($host,$db_user,$db_password);
mysql_select_db($database);

$result=mysql_query("select * from ads WHERE id='1'");
?>


<?php
// Fetch record rows in $result by while loop and put them into $row.
while($row=mysql_fetch_assoc($result)){
?>

<?php echo '<a href="' . $row['headerlink'] . '"  target="_blank" border="0">'; echo "<img width='940px' height='165px' src=http://www.sandbuddcustomdesigns.com/Musa/uploader/images/".$row['header'] ."> "; ?></a>


<?php } // End while loop. ?>


Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.