Page 1 of 1

how do i read a variable that is passed in post/get like thi

Posted: Thu Feb 12, 2004 6:02 am
by pelegk2
how do i read a variable that is passed in post/get like this :

Code: Select all

imgSearchTsir.x
thanks in advance
peleg

Posted: Thu Feb 12, 2004 6:04 am
by twigletmac
? could you elaborate a bit I'm really not sure what you mean - is that supposed to be the name of a variable?

Mac

Posted: Thu Feb 12, 2004 6:09 am
by pelegk2
yes
when i make a post the imgSearchTsir its a name of an input that have a type="image"
and when i post it gives me the imgSearchTsir.x and imgSearchTsir.y
coordinates!
and when i wan to read it on another page i cant!
what to do?
thanks in advance
peleg

Posted: Thu Feb 12, 2004 6:26 am
by LonelyProgrammer
What methods have you tried to read the variable? How about?
$imgsearch = $_GET["imgSearchTsir"];
echo $imgSearch.x . " , ". $imgSearch.y
Or even
$imgsearch = $_GET["imgSearchTsir.x"];
(Wasn't aware you could pass objects in $_POST / $_GET...)

Posted: Thu Feb 12, 2004 6:46 am
by pelegk2
no one of this is working :-(

Posted: Thu Feb 12, 2004 6:53 am
by dimitris
pelegk2 wrote:no one of this is working :-(
Try the php.net manual about variable declaration

Posted: Thu Feb 12, 2004 7:14 am
by pelegk2
wh=hat?where?

Posted: Thu Feb 12, 2004 9:23 am
by penguinboy
pelegk2 wrote:wh=hat?where?
dimitris wrote:php.net

Posted: Tue Feb 17, 2004 5:57 am
by pelegk2
this is the solution :

it converts the dot (.) into underscore (_)
$_GET['imgSearchTsir_x']


magnificont!