sidv Posted October 23, 2008 Share Posted October 23, 2008 How do I insert something into a mysql database using insertgoto and have it go to the next page and show just the record I just inserted for review? Quote Link to comment https://forums.phpfreaks.com/topic/129704-how-do-you-insertgoto-same-record/ Share on other sites More sharing options...
CroNiX Posted October 23, 2008 Share Posted October 23, 2008 um, what is insertgoto? Never heard of it and its not in the mysql docs.... but, if you do an insert ... then you can use mysql_insert_id to get the id that the record was inserted into...pass it to the next page and then select it and display it. Quote Link to comment https://forums.phpfreaks.com/topic/129704-how-do-you-insertgoto-same-record/#findComment-672504 Share on other sites More sharing options...
sidv Posted October 23, 2008 Author Share Posted October 23, 2008 What I mean is using something like this... $insertGoTo = "admin_view.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); But have it show up on a page with the specific record I just added rather than a list view of all the records Quote Link to comment https://forums.phpfreaks.com/topic/129704-how-do-you-insertgoto-same-record/#findComment-672507 Share on other sites More sharing options...
CroNiX Posted October 23, 2008 Share Posted October 23, 2008 That is so messed up looking I don't even know where to begin. Quote Link to comment https://forums.phpfreaks.com/topic/129704-how-do-you-insertgoto-same-record/#findComment-672509 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.