I'd like to control which php file is called when clicking two buttons on the 
bottom of a form; one called "Add Names", the other "Submit"

I've tried the following with no success:

*******************************************
<form action=
        switch ($name) {
                case add:
                        "rap.php" method "get">;
                        break;
                case submit:
                        "rap2.php" method "get">;
                        break;
}

. . .

<input type="submit" name="add" value="Add Names">
<input type="submit" name="submit" value="Submit">
</form>

**************

I'm still a newbie, and this is the first time I've tried to use a switch 
statement. I've probably performed an illegal operation by splitting the 
<form action . .> statement. Is there any other way of accomplishing a change 
of action? This seems so clumsy -- and also, since the clicking occurs only 
after all info is entered, does the info actually get stored anywhere prior 
to clicking or pressing Enter? 

Btw, I've also tried putting this switch statement after the <input ...> 
code, and also tried "if" statements. It usually defaults to whatever is 
loaded, and doesn't respond to the "if" or "switch" statements.

I'd appreciate any help on this -- or pointers where to look.

Tia,
Andre


-- 
Please pray the Holy Rosary to end the holocaust of abortion.
Remember in your prayers the suffering souls in Purgatory.

May God bless you abundantly in His love!

For a free Cenacle Scriptural Rosary Booklet -- http://www.webhart.net/csrb/


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

Reply via email to