ketanco
13 Apr 2008, 11:37 PM
Hi,
I am trying to test a very simple form to see if i can display the input in another page. But it doesnt display anything in the destination page.
Here is the html code in the first file:
<form method="post" action"displayresults.php">
first input:<br/>
<input type="text" name="myinput1" />
and in displayresults.php I have the following code
$myinput1=$_POST['myinput1'];
echo $myinput1;
And it is not displaying any info that I entered.
I have two questions:
1-Why this does not work, what's wrong?
2-When I submit values in the first file, where and when do those values get stored? Does it get sent right away to the destination page? I mean lets say I submit info and then turn off my computer and then next day when I open displayresults.php is it supposed to show the result or do you need to do it in the same session, or how does this work?
I am trying to test a very simple form to see if i can display the input in another page. But it doesnt display anything in the destination page.
Here is the html code in the first file:
<form method="post" action"displayresults.php">
first input:<br/>
<input type="text" name="myinput1" />
and in displayresults.php I have the following code
$myinput1=$_POST['myinput1'];
echo $myinput1;
And it is not displaying any info that I entered.
I have two questions:
1-Why this does not work, what's wrong?
2-When I submit values in the first file, where and when do those values get stored? Does it get sent right away to the destination page? I mean lets say I submit info and then turn off my computer and then next day when I open displayresults.php is it supposed to show the result or do you need to do it in the same session, or how does this work?