Jump to content

[SOLVED] directing web forms


knowledge_6

Recommended Posts

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??

Link to comment
https://forums.phpfreaks.com/topic/40811-solved-directing-web-forms/
Share on other sites

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.

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.