Sethm Posted December 17, 2009 Share Posted December 17, 2009 I have a form I am submitting to a MySql database. Each product has an ID # attached to it that auto_increment. I need to pull the auto incremented ID # for the entry I just posted onto the page so the person who added it can "Edit" the entry. How do I get that selected? I want to pull it from the database after it is inserted and make it into a hyper link, but only for 1 entry..I can't get it figured out... If anyone can help it would be greatly appreciated! Thanks, Seth Link to comment https://forums.phpfreaks.com/topic/185472-get-id-from-database-when-posting-with-a-html-form/ Share on other sites More sharing options...
rajivgonsalves Posted December 17, 2009 Share Posted December 17, 2009 you should see http://php.net/manual/en/function.mysql-insert-id.php Link to comment https://forums.phpfreaks.com/topic/185472-get-id-from-database-when-posting-with-a-html-form/#findComment-979200 Share on other sites More sharing options...
Sethm Posted December 17, 2009 Author Share Posted December 17, 2009 Excellent. I had spent nearly an hour and half trying to figure it out...That answered it in about 20 minutes! (after I wrapped my head around what it was that it was doing! THANK YOU! Link to comment https://forums.phpfreaks.com/topic/185472-get-id-from-database-when-posting-with-a-html-form/#findComment-979223 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.