At 6/3/2003 04:24 PM, Ryan A wrote:

> I simply want to submit my form to either one.php or two.php or thr.php
> depending on which BUTTON is pressed (I am using html buttons <input
> type='submit' value='blah'>) I have 3 buttons....how do i set it?

You can do this one of three ways:

1. Instead of actually submitting to a different php script, you submit to one script that gives a header location based on which submit button you use. So if I have three submit-type buttons, I'll just say

IF($_POST['submit1']) {
        header("Location: script1.php");
}
ELSEIF($_POST['submit2']) {
        header("Location: script2.php");
}

etc.

2. You submit to one script that includes the relevant functions depending on which button is pushed.

IF($_POST['submit1']) {
        include("script1.php"):
}

or

3. You do it with Javascript since what you actually want to do is on the client, not the server.

--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: [EMAIL PROTECTED]
Web: www.healthtvchannel.org


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



Reply via email to