why don't you save just before the submit was clicked?
what if he clicks submit and then he quickly closes and cancels everything
out? (you just saved for vain!)

"Richard Kurth" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is there a way to run a function when a form is submitted this is an
>  example below this form is being feed buy the form above and when the
>  customer verifies the data that has input he submits it again I what
>  to fire a function when he submits the second time
>
> <?
> if (! (isset($action))) {
> ?>
>
> <form action="<?=basename($PHP_SELF)?>" method="post">
> <table width="300" border="0" align="center">
> <tr>
>         <td><VAR>First Name</VAR></td>
>         <td><input type="text" name="fname" value=""></td>
> </tr>
> <tr>
>         <td><VAR>Last Name</VAR></td>
>         <td><INPUT TYPE="text" NAME="lname" VALUE=""></td>
> </tr>
> <tr>
>         <td><VAR>Address</VAR></td>
>         <td><INPUT TYPE="text" NAME="address" VALUE=""></td>
> </tr>
> <tr>
>         <td colspan="2" align="center"><SCRIPT>
> document.write ("<input type=hidden name='AFFILIATE_ID' value=\"" +
GetCookie("AFFILIATE") + "\">");
> </SCRIPT><input type="hidden" name="action" value="check">
>         <input type="submit" name="submit" value="Submit">
>         <input type="Reset"></td>
> </tr>
> </table>
> </form>
> <?php
>  }
> if ($action == 'check') {
> ?>
>   show the info for customer to varafy
> <VAR>First Name</VAR>&nbsp;&nbsp;<A><?echo $fname?></A><br>
> <VAR>Last Name</VAR>&nbsp;&nbsp;<A><?echo $lname?></A><br>
> <VAR>Address </VAR>&nbsp;&nbsp;<A><?echo $address?></A> <br>
>
> <FORM ACTION="https://www.paypal.com/cgi-bin/webscr"; METHOD="POST">
> INPUT TYPE="hidden" NAME="last_name" VALUE="<?echo $lname?>">
> <INPUT TYPE="hidden" NAME="address1" VALUE="<?echo $address?>">
> <INPUT TYPE="hidden" NAME="address2" VALUE="<?echo $address2?>">
> <INPUT TYPE="hidden" NAME="city" VALUE="<?echo $city?>">
> <input type="submit" name="Submit" value="Submit">
> </form>
> <?savetoafil(); }?>     <----I what this function to run after the
> submit button is clicked.
>
>
>
>
> Best regards,
>  Richard
> mailto:[EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to