nicob Posted May 3, 2009 Share Posted May 3, 2009 I tried to get the id info from http://www.domain.com/profile.php?id=v-&-cat but I only see the 'v-' The codes I tried <?= htmlentities($_GET['id']) ?> and <?php echo $_GET['id'] ?> Is this normal? And if so, how to fix this? thx! Link to comment https://forums.phpfreaks.com/topic/156616-solved-_getq-does-not-work-with/ Share on other sites More sharing options...
nankoweap Posted May 3, 2009 Share Posted May 3, 2009 it's normal. an ampersand is used to separate one parameter/value pair from another. i'm pretty sure you can encode the value, though, and allow it to pass through. Link to comment https://forums.phpfreaks.com/topic/156616-solved-_getq-does-not-work-with/#findComment-824676 Share on other sites More sharing options...
Ken2k7 Posted May 3, 2009 Share Posted May 3, 2009 Why do you have that in the parameter anyways? Link to comment https://forums.phpfreaks.com/topic/156616-solved-_getq-does-not-work-with/#findComment-824682 Share on other sites More sharing options...
nicob Posted May 3, 2009 Author Share Posted May 3, 2009 Thank you. @Ken2k7 Some people like to use strange characters in their 'names'. It works ok in the browser, except this problem. Link to comment https://forums.phpfreaks.com/topic/156616-solved-_getq-does-not-work-with/#findComment-824692 Share on other sites More sharing options...
Ken2k7 Posted May 3, 2009 Share Posted May 3, 2009 You can urlencode() the output of the string and then urldecode(). Link to comment https://forums.phpfreaks.com/topic/156616-solved-_getq-does-not-work-with/#findComment-824695 Share on other sites More sharing options...
nicob Posted May 3, 2009 Author Share Posted May 3, 2009 Thanks Ken! Link to comment https://forums.phpfreaks.com/topic/156616-solved-_getq-does-not-work-with/#findComment-825172 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.