The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Why wont this post workM
allenph
post 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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post 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?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
allenph
post Feb 19 2012, 06:26 PM
Post #3


Novice
**

Group: Members
Posts: 21
Joined: 15-February 12
Member No.: 16,477



QUOTE(Darin McGrew @ Feb 18 2012, 03:31 PM) *

What do you see when you view source on the "blank" results page?

I figured it out. something was messed up with php folder. thanks anyways!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 24th April 2024 - 12:56 PM