I thought you could, but actually I dont think you can ... however there is
this little hack I just came up with.
FORM Example
<form  action = 'redirect.php>

<input type = 'submit' name = 'Page1' value = "goto Page 1">
<input type = 'submit' name = 'Page2' value = "goto Page 2">

</form>

Code for redirect.php
<?php

# Has button 1 been pushed/sent?
if (isset ($HTTP_POST_VARS['Page1'])) {
    include ('page1.php');
    exit(); #optional depending on programming style
}
# Has button 2 been pushed/sent?
elseif (isset ($HTTP_POST_VARS['Page2'])) {
    include ('page2.php');
    exit(); #optional depending on programming style
}
# Both buttons NOT been pushed/sent
else {
    die ('no page selected');
}
?>

I hope you are familiar enough with PHP to understand the above. Basically
depending on what Page variable was passed from the submit button, then you
pull that script (either page1.php or page2.php).  Note: The name attribute
of the submit button must match in the POST array and also are case
sensitive.


Bobby


"Matt Palermo" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have a script that contains a form which goes to page1.php on the
> click of a submit button.  Inside the form are lots of checkboxes and
> things to fill out that get passed to page1.php.  I want to put another
> button in there that send all the same names and values of the
> checkboxes to page2.php.  Is this possible to have 2 buttons going to 2
> different places, but using the same data for all other form elements?
> I would really appreciate any help I can get.  Thanks.
>
> Matt
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to