|
Posted by nice.guy.nige on 10/19/07 07:49
While the city slept, SaraLeePerson@gmail.com (SaraLeePerson@gmail.com)
feverishly typed...
[...]
> <form method=post action="">
> <INPUT type="submit" name="button">
> <input type="hidden" name="test_Data" value="100">
> </form>
>
> So basically I want to prove hitting the form submit button sends me
> to the same page it is on, and passes some result back to it, and I
> can take it from there. Can this be done? :)
Assuming you have PHP on your server, try something like the following;
<form method="post" action="<? echo $_SERVER["PHP_SELF"]; ?>">
(rest of form...)
</form>
and anywhere else on your page...
<?php
if(isset($_POST["test_Data"])) {
print("<p>test_Data = ".$_POST["test_Data"]."</p>\n");
}
?>
Hope that helps.
Cheers,
Nige
--
Nigel Moss http://www.nigenet.org.uk
Mail address will bounce. nigel@DOG.nigenet.org.uk | Take the DOG. out!
"Your mother ate my dog!", "Not all of him!"
Navigation:
[Reply to this message]
|