colinsp Posted February 21, 2009 Share Posted February 21, 2009 You were all so helpful the other day i thought that I would come back for some more (hopefully you don't mind) I have got well under way with the application I want to create. I have a url stored in a mysql database. I have retrieved it and displayed it on my page BUT when you click the link it just refreshes the page it doesn't take you to the linked url. I suspect that I have some missing quotes but I can't work out where. Here is the section of the code while($row = mysql_fetch_array($result, MYSQL_NUM)) { echo "<tr>"; //echo $row[2]." ".$row[3]." ".$row[4]."<br>\n "; echo "<td>$row[2]</td>"; echo "<td>$row[3]</td>"; echo "<td><a href=>$row[4]</a></td>"; echo "</tr>\n"; } It is $row[4] that hold the url. It displays correctly on the html page it is just the link that doesn't work. TIA for any advice. Colin Link to comment https://forums.phpfreaks.com/topic/146248-solved-another-newbie-problem-trying-to-code-a-href/ Share on other sites More sharing options...
Cal Posted February 21, 2009 Share Posted February 21, 2009 echo "<td><a href=\"$row[4]\">New page</a></td>"; ^ $row[4] needed to be in the href="". Link to comment https://forums.phpfreaks.com/topic/146248-solved-another-newbie-problem-trying-to-code-a-href/#findComment-767776 Share on other sites More sharing options...
colinsp Posted February 21, 2009 Author Share Posted February 21, 2009 Thanks I thought that it was something dumb. So much to learn! Link to comment https://forums.phpfreaks.com/topic/146248-solved-another-newbie-problem-trying-to-code-a-href/#findComment-767779 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.