Board index   FAQ   Search  
Register  Login
Board index PHP PHP Scripts

redirect to submit button

Links for php scripts

Moderators: macek, egami, gesf

redirect to submit button

Postby ipeteweb » Sun Mar 17, 2013 4:19 am

I have button on main page
When i press button i need redirect to submit button on another page...
It is like i press button from other page and get result
How could i do this?

Submit button looks like this:
<form method="POST" action="<?php echo $banks[ $preferences['bankname'] ]['url']; ?>">
<?php
foreach ($macFields as $f => $v) {
echo '<input type="hidden" name="' . $f . '" value="' . htmlspecialchars ($v) . '" />' . "\n";
}
?>
<table cellpadding="0" cellspacing="0" border="2">

<tr>
<td colspan="2" align="center"><input type="submit" value="pay" /></td>
</tr>
</table>
</form>
ipeteweb
New php-forum User
New php-forum User
 
Posts: 3
Joined: Fri Mar 15, 2013 7:33 am

Re: redirect to submit button

Postby seandisanti » Mon Mar 18, 2013 10:27 am

You're over thinking it. All the submit button on form B does is transfer to the handler specified in the form's action property via the forms method property. If you want form a to submit to form b's handler (which is what would happen if you clicked B's submit button) then just specify the same action property for form a and form b.
seandisanti
php-forum Fan User
php-forum Fan User
 
Posts: 773
Joined: Mon Oct 01, 2012 12:32 pm


Return to PHP Scripts

Who is online

Users browsing this forum: TurnitinBot [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.