Why wont this post workM |
Why wont this post workM |
allenph |
Feb 17 2012, 10:42 PM
Post
#1
|
Novice Group: Members Posts: 21 Joined: 15-February 12 Member No.: 16,477 |
So I'm working on a forum in php and html, I needed to learn the post method and tried it. I am trying to use the simplest code I can think of yet I'm obviously making some rookie mistake...
There are two files...input.php and results.php they are both in the same folder called Test. The exact code for input.php (nothing else in the file besides this) is: <html> <head> <title>Name Page 1</title> </head> <body> <form action="results.php" method="post"> Name:<input type="text" name="name" /> <input type="submit" /> </form> </body> </html> The exact code for results.php(yet again nothing else other than this in the file) is: <html> <head> <title>Name Page 2</title> </head> <body> <?php echo $_POST['name']; ?> </body> </html> So when I open input.php in my browser I put say...my name Allen in the box press the submit button...then I am redirected to a blank results.php I don't know what I am doing wrong. Please help! Ty This post has been edited by allenph: Feb 17 2012, 11:06 PM |
Darin McGrew |
Feb 18 2012, 03:31 PM
Post
#2
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
What do you see when you view source on the "blank" results page?
|
allenph |
Feb 19 2012, 06:26 PM
Post
#3
|
Novice Group: Members Posts: 21 Joined: 15-February 12 Member No.: 16,477 |
|
Lo-Fi Version | Time is now: 24th April 2024 - 12:56 PM |