Form with multiple redirects.
Hello all
Does anyone know how I can make a form have multiple redirects?
For example, if someone fills in a form and from the "gender" drop down menu, they select , I would like it to redirect them to information for men when they press submit. and if they select redirect them to information for women. How can I do this?
Thanks in advance..
zollet posted this at 13:59 — 27th October 2002.
He has: 1,016 posts
Joined: May 2002
Do you want to save the information or just redirect them according to their selection of a pulldown menu?
mizzy posted this at 14:11 — 27th October 2002.
They have: 47 posts
Joined: Jun 2001
I would like to save / email the information and then redirect. I already have the saving part worked out but I need to figure out how to redirect as needed.
Thanks
zollet posted this at 16:01 — 27th October 2002.
He has: 1,016 posts
Joined: May 2002
Are you using PHP? In that case, here's a little script...
<?php
//assuming $gender holds the value of the gender drop down menu
if($gender == \"Male\") {
//IF they select \"Male\"
$forwardURL = \"http://www.male.com/\";
} elseif($gender == \"Female\") {
//IF they select \"Female\"
$forwardURL = \"http://www.female.com/\";
} else {
//IF they don't select anything/something else
$forwardURL = \"http://www.trans.com/\";
}
header(\"Location: $forwardURL\");
?>
mizzy posted this at 03:25 — 28th October 2002.
They have: 47 posts
Joined: Jun 2001
thanks zollet!
It does what I need just fine.
zollet posted this at 04:43 — 28th October 2002.
He has: 1,016 posts
Joined: May 2002
You're more than welcome.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.