knowledge_6 Posted March 2, 2007 Share Posted March 2, 2007 hello.. here is my concept.. i want to make a web form but i want 4 pages to this form 1. password login page 2. enter your membership number 3. if membership # is from 1-10 then go to www.form1.com 4. if membership # is from 11-20 then go to www.form2.com how would i do the if statements?? to get the code to recognize the range?? Quote Link to comment https://forums.phpfreaks.com/topic/40811-solved-directing-web-forms/ Share on other sites More sharing options...
The14thGOD Posted March 2, 2007 Share Posted March 2, 2007 I'm assuming you have a script to connect to the database? Or a flat file perhaps? In any case what you would want to do is something similar to : <?php //query blah blah here $member_id = $row[member_id]; if ($member_id >= 1 and $member_id <=10) header("Location: form1.php"); } else{ header("Location: form2.php"); } ?> Assuming you dont have a member id of 0 or higher than 20 that should work, though youll need too add your own code of course. Quote Link to comment https://forums.phpfreaks.com/topic/40811-solved-directing-web-forms/#findComment-197620 Share on other sites More sharing options...
knowledge_6 Posted March 2, 2007 Author Share Posted March 2, 2007 noi don't have a database.. it's for a wedding website. basically the invitation has a number.. if your invited to both the wedding and reception u get number 300-400 if your invited just to the wedding you get inviation number 100-200 when u go to the site and try to RSVP it's going to ask you first to login with a login and password that everyone is going to use.. then it will ask you for you invitation number and depding on the invitation number you have it will direct you to the proper RSVP form Quote Link to comment https://forums.phpfreaks.com/topic/40811-solved-directing-web-forms/#findComment-198200 Share on other sites More sharing options...
knowledge_6 Posted March 3, 2007 Author Share Posted March 3, 2007 anyway.. thanks for the help "The14thGOD" i got it to work with my code ; > Quote Link to comment https://forums.phpfreaks.com/topic/40811-solved-directing-web-forms/#findComment-198490 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.