|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
$_Get can't retrieve + or /
hi,
I don't know how to retrieve special character like +, / etc from the URL using $_Get. I just get empty when retrieving that. e.g http://www.sit.com/firstpage.php? thread=what I want + what I get I am getting : http://www.sit.com/firstpage.php?thread=what I want what I get I appreciate if someone can help. thax, wxyz |
|
#2
|
|||
|
|||
|
This should sort you out -
http://uk.php.net/manual/en/function.urlencode.php -KM- |
|
#3
|
||||
|
||||
|
You have:
http://www.sit.com/firstpage.php?thread=what I want what I get However the browser typically encodes it as follows: http://www.sit.com/firstpage.php?thread=what+I+want+what+I+get PHP would then read the input string and decode the url: $_GET['thread'] = 'what I want what I get' If you want the '+' symbols being passed, as kode_monkey stated prior, you should make use of the urlencode function <a href="page.php?t=<?=urlencode('This+will+have+pluses');?>">click here</a> |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > $_Get can't retrieve + or / |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|