Page 1 of 1

Problem with sending variables to a diffrent page.

Posted: Sun Jul 05, 2009 1:32 am
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?

Re: Problem with sending variables to a diffrent page.

Posted: Sun Jul 05, 2009 1:21 pm
by William
You need to use the super global array $_GET. So do

Code: Select all

<?php echo $_GET['user']; ?>
instead. http://us.php.net/manual/en/language.va ... lobals.php