Form with multiple redirects.

They have: 47 posts

Joined: Jun 2001

Hello all Laughing out loud
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..
Wink

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?

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

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\");
?>

They have: 47 posts

Joined: Jun 2001

thanks zollet!
It does what I need just fine.

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.