redirect to submit button

Links for php scripts

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 3
Joined: Fri Mar 15, 2013 7:33 am

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']; ?>">
foreach ($macFields as $f => $v) {
echo '<input type="hidden" name="' . $f . '" value="' . htmlspecialchars ($v) . '" />' . "\n";
<table cellpadding="0" cellspacing="0" border="2">

<td colspan="2" align="center"><input type="submit" value="pay" /></td>

php-forum Fan User
php-forum Fan User
Posts: 973
Joined: Mon Oct 01, 2012 12:32 pm

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.

Return to “PHP Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest