This topic is locked
[SOLVED]

 Multiple Page Forms

5/14/2010 3:28:28 AM
PHPRunner General questions
S
shaiqbashir author

Dear all
I want to create a simple multipage form with phprunner 5.2. It comprises of two pages, on one page it asks for name and email. and then when submit button is pressed, i want it to goto another form with name and email fields already filled with the values entered on the first page.This new form will ask for more information for example phone number and address. then when the submit is pressed, they all are stored in the same database.All this information should be viewed/edited in the same list.
Can you please help me out in this.
Best Regards
Shaiq Bashir

A
ann 5/14/2010

Shaiq,
Create a Сustom view of the table on the Datasource tables tab. Then proceed to the Choose fields tab and check the fields you want to be on the first page(table) and the second page (custom view).

For the first page use the After record added event on the Events tab. Add the following code to redirect to the second page:

header("Location: SecondTable_edit.php?editid1=".mysql_insert_id());

exit();
S
shaiqbashir author 5/14/2010



Shaiq,
Create a Сustom view of the table on the Datasource tables tab. Then proceed to the Choose fields tab and check the fields you want to be on the first page(table) and the second page (custom view).

For the first page use the After record added event on the Events tab. Add the following code to redirect to the second page:

header("Location: SecondTable_edit.php?editid1=".mysql_insert_id());

exit();



Thanks for your help Miss. Ann!
Im a big beginner in this software right now. Can you please provide some detail.
Look let me explain the scenario in the light of your help!
I should first create a table, then right click on that table and create a custom view. Now from where i can choose what fields to be on first page and what on second?
Best Regards
Shaiq Bashir

S
shaiqbashir author 5/14/2010

Ok Miss. Ann
i got it now. its working!
thank you!

B
bigtt76 6/30/2010



Shaiq,
Create a Сustom view of the table on the Datasource tables tab. Then proceed to the Choose fields tab and check the fields you want to be on the first page(table) and the second page (custom view).

For the first page use the After record added event on the Events tab. Add the following code to redirect to the second page:

header("Location: SecondTable_edit.php?editid1=".mysql_insert_id());

exit();



Hi Ann,

Thanks for this. However I skind of find it a bit difficult to get it running. If I may ask 'what should replace the SecondTable_edit?" Thanks in anticipation.
Bigtt

A
ann 7/1/2010

Bigtt,
just change SecondTable to the actual name of the second table (more detailed as in the post). Once you create the table on the Datasource tables tab you will be able to have SecondTable_edit page.

J
jansgroup 7/17/2010

If you enable AUDIT TRAIL.

and Select LOG TO DATABASE.

allow the PHPR to <CREATE NEW> for LOG TABLE.
THEN This tutorial will not work.
It took me countless hours to figure this out.
It appears that the mysql_insert_id() selects the auto incremental # from the AUDIT TABLE versus the Table you may desire.
Am I wrong, can anyone else reduplicate?

Did i do something wrong? I can get this tutorial to work great with AUDIT TRAIL not enabled.

A
ann 7/19/2010

Hi,
try this code then:

header("Location: SecondTable_edit.php?editid1=".$keys["Id"]);

exit();



where Id is your actual key field name.