Help: Suggestions for multi page form validation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a multi-page form that ends in the last page as
a transaction to mysql.  In the transaction there are
a number of steps, i.e.

query1 = Insert into "..........
run query1
query2 = Insert into ".........
run query 2
query3 = Insert into "..........
run query 3

Then an if / else statement that checks if all queries
were sucessful (commit) or else (rollback)

I need to add server side validation 
So my thoughts are :

1- Do it on a page by page (form by form) basis,
meaning user can't go past page1 if there are form
error.  I'm just not sure in this case where the
validation would go.  Since 1st page is set on submit
to go to 2nd page. Would I put the validations on
page/form2 and then it would print out errors
directing back to form1 ?

2- Last page validation - waiting till the transaction
page to do validation. Should I set this up as one
block on top that checks all the submitted form
values, or pepper throughout all the transactions ?  

Hope my question is clear and am open to  any
suggestions or ideas.

Thank you ,
Stuart

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux