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

.

Reply via email to