im running application on php..
after i update the status on the database, its not reflecting the correct status on the webpage... It will still display the first status which is -FOUND-
mysql_query("UPDATE registration.user SET STATUS ='-LOST-' WHERE UserID = '$userid'");
Anyone assist?
For the login page , i fetch from database:
$data = mysql_fetch_row($sql_query);
// store the data into session variables
$_SESSION['UserID'] = $data[6];
$_SESSION['Password'] = $data[3];
$_SESSION['Name'] = $data[1];
$_SESSION['AdminNo'] = $data[2];
$_SESSION['mac'] = $data[4];
$_SESSION['status'] = $data[5];
$_SESSION['email'] = $data[7];
$_SESSION['id'] = $data[0];
Then i display it on my index page:
<?php echo $_SESSION['status'] ?>
When i click on Report Loss button:
mysql_query("UPDATE registration.user SET STATUS ='-LOST-' WHERE UserID = '$userid'");
When i click on Found button on the same page:
mysql_query("UPDATE registration.user SET STATUS ='-FOUND-' WHERE UserID = '$userid'");
But when i press back to the index page, it still only display the status info from the login page. I have tried to fetch the new data again on the index page but the status show empty