Welcome to WebmasterWorld Guest from 220.127.116.11
<FORM name="testform" method="post" action="http://foo.com">
<INPUT TYPE="hidden" name="userid" value="3005">
<INPUT TYPE="image" src="some_button.gif" name="submit" onClick="<?php
$body = "Userid = ".? what do I put here to get the value out of the userid form field?
mail("email@example.com", "Someone clicked a form!", $body, "From:firstname.lastname@example.org");
If I understand it right what you're trying to do, I'd say that it is not possible before the form gets submitted. The form values are on the client side whereas PHP is running on the server-side. Any processing would need to be done by the script specified in the
attribute. But then it's no problem - just put the
command in that script.
Hope it helps,
Unfortunately, I don't have control over the script in the action side, its being hosted by a third party.
You could plug in your script as the action and then you have two choices
1. Make a confirmation screen. Email all you need to yourself and then have another submit button at the bottom to resub the info to the other script. Have a titla similar to "You ebtered this info please click submit to send it".
2. take a look at curl