mysql_insert_id() will tell you the number of last auto_increment 
insert, you can use this, but you must keep it using session on the 
server side for security reasons. But better solution be to use session 
or hidden fields in your forms to pass the values from page to page and 
insert them at once on the last page.

Axis Computers wrote:

> Hi,
> I'm developing a web application that uses forms for user input and 
> then after each form is filled shows something like Welcome Bob to our 
> site ... bla. bla... inserts data in a table and on the same page 
> continues with the rest of the data, and goes to another form and so on.
> I have no problems inserting the data from the first form in the 
> table, display the personalized message, and then connect to the mySQL 
> db, my problem is some fields in the table which must be filled are 
> null in this first instance, and then on the second form they are filled,
> but my I donīt know how can I fill the gaps and leave all the data in 
> one row, because the first field auto increments, and I'm worried the 
> data instead of filling one row spreads accross two or three.
> i.e
> First: Bob
> Last: Evans
> //user submits form
> ///On the second form
> says "Welcome Bob Evans and congratulations ... bla bla ..."
> // inserts data into table
> // Then asks for more data
> Address : Somewhere 555
> Ocupation: Something
> // user submits form
> // data is inserted into the table and the gaps are filled or is updated ?
> >>>> here is what I don't know if data is still on the same row and 
> effectively filled the gaps, or it is inserted into another road ... 
> using insert or update ?
> Thanks for your tips
> Rick
> ** 
> *__________________________________________________________________*
> *ICQ#: 37031810*
> *Current ICQ status:*  
> *+*  *More ways to contact me * <>
> *__________________________________________________________________*

Reply via email to