co.ador Posted January 12, 2010 Share Posted January 12, 2010 <?php $id= $_GET['id']; ?> <li ><a href="prueba.php?id=<?php $id ?>"><img src="images/menu.gif" align="middle" alt="menu" width="100%" height="22" /></a></li> the link in the li tags will come out with an empty id in the url string like http://localhost/store/prueba.php?id= Don't know why is coming as empty. Link to comment https://forums.phpfreaks.com/topic/188194-id-variable-comes-as-empty-in-the-url-string/ Share on other sites More sharing options...
KevinM1 Posted January 12, 2010 Share Posted January 12, 2010 You need to echo the $id variable. I.e.: <li><a href="prueba.php?id=<?php echo $id; ?>"><img src="images/menu.gif" align="middle" alt="menu" width="100%" height="22" /></a></li> Link to comment https://forums.phpfreaks.com/topic/188194-id-variable-comes-as-empty-in-the-url-string/#findComment-993535 Share on other sites More sharing options...
co.ador Posted January 12, 2010 Author Share Posted January 12, 2010 Thank you very much Nightslyr Link to comment https://forums.phpfreaks.com/topic/188194-id-variable-comes-as-empty-in-the-url-string/#findComment-993550 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.