PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
pelegk2
Forum Regular
Posts: 633 Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:
Post
by pelegk2 » Thu Feb 12, 2004 6:02 am
how do i read a variable that is passed in post/get like this :
thanks in advance
peleg
twigletmac
Her Royal Site Adminness
Posts: 5371 Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK
Post
by twigletmac » Thu Feb 12, 2004 6:04 am
? could you elaborate a bit I'm really not sure what you mean - is that supposed to be the name of a variable?
Mac
pelegk2
Forum Regular
Posts: 633 Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:
Post
by pelegk2 » Thu Feb 12, 2004 6:09 am
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
LonelyProgrammer
Forum Contributor
Posts: 108 Joined: Sun Oct 12, 2003 7:10 am
Post
by LonelyProgrammer » Thu Feb 12, 2004 6:26 am
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...)
pelegk2
Forum Regular
Posts: 633 Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:
Post
by pelegk2 » Thu Feb 12, 2004 6:46 am
no one of this is working
dimitris
Forum Contributor
Posts: 110 Joined: Wed Jan 14, 2004 3:47 am
Location: Athens, Greece
Post
by dimitris » Thu Feb 12, 2004 6:53 am
pelegk2 wrote: no one of this is working
Try the php.net manual about variable declaration
pelegk2
Forum Regular
Posts: 633 Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:
Post
by pelegk2 » Thu Feb 12, 2004 7:14 am
wh=hat?where?
penguinboy
Forum Contributor
Posts: 171 Joined: Thu Nov 07, 2002 11:25 am
Post
by penguinboy » Thu Feb 12, 2004 9:23 am
pelegk2 wrote: wh=hat?where?
dimitris wrote: php.net
pelegk2
Forum Regular
Posts: 633 Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:
Post
by pelegk2 » Tue Feb 17, 2004 5:57 am
this is the solution :
it converts the dot (.) into underscore (_)
$_GET['imgSearchTsir_x']
magnificont!