Ezilon.com - Target Your Audience, be Seen in Your Region

Form with multiple redirects.

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.

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?

Saeed Sarvi [ Email | Profile ]

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

Saeed Sarvi [ Email | Profile ]

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.