Re: Can't get $_GET to work

From: Date: Wed, 29 Jun 2005 14:23:40 +0000
Subject: Re: Can't get $_GET to work
References: 1  Groups: php.install 
Request: Send a blank email to php-install+get-16401@lists.php.net to get a copy of this message
Your problem is that arrays (including $_GET and $_POST) are case-sensitive. Thus, $_GET['name'] is not the same thing as $_GET['Name']. The name of the form field is "Name", so you'd have to use $_GET['Name']. Ian Bambury wrote:
Hi Everyone, I'm probably being a bit thick here, but I can't get hold of $_GET or $_POST variables. I've set up 2 files as simply as I can, but no joy. File a.php ---------- <html> <head><title></title></head> <body> name: <form action="b.php" method="get"> <input type="text" name="Name"><br> <input type="submit" value="send"> </form> </body> </html> ----------- produces http://127.0.0.1/b.php?name=fred file b.php --------- <html> <head><title></title></head> <body> Name: <?php echo $_GET['name'] ?> <br> </body> </html> --------- prints Name: and nothing else What *am* I doing wrong? Cheers, Ian .


« previous php.install (#16401) next »