Re: Form Posting from script
| From: | Kevin Stone | Date: | Tue, 13 Aug 2002 19:50:48 +0000 |
| Subject: | Re: Form Posting from script | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-112418@lists.php.net to get a copy of this message | ||
It's pretty easy but can be confusing if you're looking at this stuff for
the first time. Look into fsocketopen() and fputs(). You can use Rasmus's
posttohost() function if you're not comfortable writing your own. Do a
search on www.php.net. Hope this helps.
-Kevin
----- Original Message -----
From: "GeneralX" <mbsisot@sbcglobal.net>
To: <php-general@lists.php.net>
Sent: Tuesday, August 13, 2002 11:53 AM
Subject: [PHP] Form Posting from script
How do you post a form without actually waiting for submit button to be
pressed? Got a CGI expecting a form post, all the fields are already
available as hidden type in a form, and just need to be send it.
I know you can use Java as such:
<form method="post" action="CGI.php">
<input type="hidden" name="FName" value="myFirstName">
</form>
<script type="text/javascript">
document.forms[0].submit();
</script>