Problem with sending variables to a diffrent page.

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
badihi
Forum Newbie
Posts: 15
Joined: Sun Jul 05, 2009 1:16 am

Problem with sending variables to a diffrent page.

Post by badihi »

Hello.
I started PHP Programming two days ago!
When I send some variables to a diffrent page by GET method like this:
localhost/b.php?user="Peter"
in b.php page the variabe "user" is not defined.
Can somebody help me?
User avatar
paqman
Forum Contributor
Posts: 125
Joined: Sun Nov 14, 2004 7:41 pm
Location: Burnaby, BC, Canada

Re: Problem with sending variables to a diffrent page.

Post by paqman »

All variables sent through the GET method, in the URL, will be stored in the $_GET array. So for yourpage.php?user=123 $_GET["user"] would equal "123".
badihi
Forum Newbie
Posts: 15
Joined: Sun Jul 05, 2009 1:16 am

Re: Problem with sending variables to a diffrent page.

Post by badihi »

Thanks very much Mr. paqman.
God blass you!
Post Reply