stuart7398 Posted April 8, 2008 Share Posted April 8, 2008 hi. i require my users to send data to me, once their data is verified by a human i then give them the second part of the form to complete their profile. how would i assign them an automatic 'id' for them to use in order for me to keep their data details together for when they complete the second part of the form? any help / tutorials would be grateful. thanks, Stuart. Quote Link to comment Share on other sites More sharing options...
AndyB Posted April 8, 2008 Share Posted April 8, 2008 A database with an auto-incrementing id would do nicely. Quote Link to comment Share on other sites More sharing options...
stuart7398 Posted April 8, 2008 Author Share Posted April 8, 2008 thanks. maybe i worded my question wrong. i meant, how would i get that 'id' to show up in my thankyou page? thanks, stuart. Quote Link to comment Share on other sites More sharing options...
kevin7 Posted April 8, 2008 Share Posted April 8, 2008 i helped to do some search in google, this is pasted from one of the poster. so, i assume you hv set the id column to auto increment.. $query = mysql_query("SELECT MAX(id) FROM `table`"); $results = mysql_fetch_array($query); $cur_auto_id = $results['MAX(id)'] + 1; more detail on http://codingforums.com/archive/index.php?t-94437.html do search google! Quote Link to comment Share on other sites More sharing options...
ohdang888 Posted April 8, 2008 Share Posted April 8, 2008 no kevin..... you never get the array. making the colunm auto increment deos that all for you... no need to insert or update that column AT ALL. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.