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

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

Post Reply
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

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

Post 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
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post 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
User avatar
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 »

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 »

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...)
User avatar
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 »

no one of this is working :-(
User avatar
dimitris
Forum Contributor
Posts: 110
Joined: Wed Jan 14, 2004 3:47 am
Location: Athens, Greece

Post by dimitris »

pelegk2 wrote:no one of this is working :-(
Try the php.net manual about variable declaration
User avatar
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 »

wh=hat?where?
penguinboy
Forum Contributor
Posts: 171
Joined: Thu Nov 07, 2002 11:25 am

Post by penguinboy »

pelegk2 wrote:wh=hat?where?
dimitris wrote:php.net
User avatar
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 »

this is the solution :

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


magnificont!
Post Reply