You are here: Re: Need expert help with advanced form Submit question « HTML « IT news, forums, messages
Re: Need expert help with advanced form Submit question

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация