takeiteasy Posted July 11, 2006 Share Posted July 11, 2006 Hi there,Just want to ask if there's any PHP code that can display the data which has just been stored in the database?thanks Link to comment https://forums.phpfreaks.com/topic/14275-view-previous-entry/ Share on other sites More sharing options...
ToonMariner Posted July 11, 2006 Share Posted July 11, 2006 mysql_insert_id(); Link to comment https://forums.phpfreaks.com/topic/14275-view-previous-entry/#findComment-56087 Share on other sites More sharing options...
takeiteasy Posted July 11, 2006 Author Share Posted July 11, 2006 can u further explain on how this code works?thanks Link to comment https://forums.phpfreaks.com/topic/14275-view-previous-entry/#findComment-56090 Share on other sites More sharing options...
brown2005 Posted July 11, 2006 Share Posted July 11, 2006 yeah use mysql_insert_id(); to select the record last inserted and then call it using this$inserted_id = mysql_insert_id(); $sql = "SELECT * FROM table WHERE id='$inserted_id ' LIMIT 1";$query = mysql_query($sql ) or die(mysql_error());while($array= mysql_fetch_array($query)){$array['fieldnames'];} Link to comment https://forums.phpfreaks.com/topic/14275-view-previous-entry/#findComment-56092 Share on other sites More sharing options...
takeiteasy Posted July 11, 2006 Author Share Posted July 11, 2006 oh. i get it. thanks alot! ;) Link to comment https://forums.phpfreaks.com/topic/14275-view-previous-entry/#findComment-56102 Share on other sites More sharing options...
brown2005 Posted July 11, 2006 Share Posted July 11, 2006 no problem, let me know if it works, :) Link to comment https://forums.phpfreaks.com/topic/14275-view-previous-entry/#findComment-56103 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.