paulman888888 Posted June 5, 2008 Share Posted June 5, 2008 I have got my php code but i dont know how to put a link with an image my code echo "<td>".$row['location']."</td>\n"; how can i have an image that has a link to location? i thought of this but i think its wrong echo "<td><a href='".$row['location"]."'><img src="images/downloadsm.png" /></a></td>\n"; Please help Quote Link to comment Share on other sites More sharing options...
jonsjava Posted June 5, 2008 Share Posted June 5, 2008 <?php $location = $row['location']; echo "<td><a href='$location'><img src="images/downloadsm.png" /></a></td>\n"; ?> Quote Link to comment Share on other sites More sharing options...
paulman888888 Posted June 5, 2008 Author Share Posted June 5, 2008 i cant use that because its coming out of a mysql database. Quote Link to comment Share on other sites More sharing options...
jonsjava Posted June 5, 2008 Share Posted June 5, 2008 I just reused your code, fixing one small thing, and restructuring something to make it look nicer. It's your code. I'm betting you can use it. Quote Link to comment Share on other sites More sharing options...
paulman888888 Posted June 5, 2008 Author Share Posted June 5, 2008 found it its that echo "<td><a href='".$row['location']."'><img src="images/downloadsm.png" /></a></td>\n"; Quote Link to comment Share on other sites More sharing options...
discomatt Posted June 5, 2008 Share Posted June 5, 2008 The issue here is unescaped quotes, i believe <?php echo '<td><a href="'. $row['location'] .'"><img src="images/downloadsm.png" /></a></td>'."\n"; ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.