denoteone Posted September 3, 2008 Share Posted September 3, 2008 I want o pass the current url to a php form in the <a href> as a variable. would it look something like.... <a href="get_info.php?title=Interview&page=<?php echo $PHP_SELF?>" is this the best way to do this? Thanks everyone in advance! Link to comment https://forums.phpfreaks.com/topic/122533--/ Share on other sites More sharing options...
ngreenwood6 Posted September 3, 2008 Share Posted September 3, 2008 I generally use this: <?php echo $_SERVER['PHP_SELF']; ?> but i think it is all in personal preference. Link to comment https://forums.phpfreaks.com/topic/122533--/#findComment-632657 Share on other sites More sharing options...
kenrbnsn Posted September 3, 2008 Share Posted September 3, 2008 Echoing $PHP_SELF will only work in register_globals is enabled. This haven't been enabled by default in close to 5 years and will be removed in in PHP6. Always uses <?php echo $_SERVER['PHP_SELF']; ?> Ken Link to comment https://forums.phpfreaks.com/topic/122533--/#findComment-632671 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.