Jump to content

Archived

This topic is now archived and is closed to further replies.

takeiteasy

view previous entry

Recommended Posts

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

Share this post


Link to post
Share on other sites
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'];
}

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.