tags:

views:

40

answers:

4

how post and get "&" symbol in url? in php. please help me ........

+4  A: 

Encode data with urlencode. It will be decoded automatically when parsed into $_POST.

David Dorward
A: 

encoded as "%26".

u can use function urlencode()

Haim Evgi
+2  A: 

use urldecode

http://www.php.net/manual/en/function.urldecode.php

$searchword = urldecode($_GET['searchword']);
Haim Evgi
output: "G".how get all values?
Murugesh
if u print $_GET['searchword'] , what u get ?
Haim Evgi
Haim Evgi
A: 

Have you tried:

index.php?searchword=G%20%26%20G%20Tours
Cipi
`+` in a query string is equivalent to `%20` according to the specs.
Ignacio Vazquez-Abrams
form action="get" - url passing value is G+%26+G+Tours.how i get full value?
Murugesh
i get "G" only, not all
Murugesh