This topic is locked

How do i create a 3 step contact form (with 3 tables)

2/9/2010 10:13:34 AM
PHPRunner General questions
J
jansgroup author

Process: contacts come to website and complete 3 forms (or steps 1,2,3)
step 1: they complete a short contact form (database table = Contacts) on save they are redirected to step 2: where they complete a short Life form (database table = Contacts_Life) on save they are redirected to step 3: where they complete a short History form (database table = Contacts_History) on save they are directed to a success/thank you page.
3 forms are independent from each other during data entry (note: all 3 forms "Add Page" are already set to guest, and accessible to the public)
Table 1 = Contacts (ContactID is INT(11) auto incremental, primary key)
Table 2 = Contacts_Life (Contacts_LifeID is INT(11) auto

incremental, primary key) (also has ContactID)
Table 3 = Contacts_History (Contacts_HistoryID is INT(11)

auto incremental, primary key) (also has ContactID)
all have a common field known as ContactID
So in Query Designer, Events, Etc. what would be the best way to set up this scenario?
Any assistance for a new beginner, new to PHPRunner? Thanks in advance.

I
injowire 2/11/2010

I am searching for the exact same question and I am not sure if how I can have a multiple page form where the primary key i-e ContactID in this case can be added automatically in multiple tables. I have searched all over here in this forum for a multi-part forms without any luck. Being a new bee, I am wondering if it is even possible with the PHPRunner? Gurus, please help. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=47693&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />

J
Jane 2/15/2010

Hi,
you can pass ContactID to the second and third add pages:

header("Location: tablename_add.php?ContactID=".$keys["ContactID"]);



Then process this value in the Before process event:

$_SESSION["ContactID"] = $_REQUEST["ContactID"];



and save it in the Contacts_Life and Contacts_History tables:

$values["ContactID"] = $_SESSION["ContactID"];