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. Link to comment https://forums.phpfreaks.com/topic/100074-solved-automatic-id/ 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. Link to comment https://forums.phpfreaks.com/topic/100074-solved-automatic-id/#findComment-511700 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. Link to comment https://forums.phpfreaks.com/topic/100074-solved-automatic-id/#findComment-511708 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! Link to comment https://forums.phpfreaks.com/topic/100074-solved-automatic-id/#findComment-511720 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. Link to comment https://forums.phpfreaks.com/topic/100074-solved-automatic-id/#findComment-511723 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.