Page not showing database updated info but database is updated

I have a standard form that displays users current data from a mysql database once logged in. Users can then edit their data then submit it to page called editform.php that does the update. All works well except that the page does not display the updated info. Users have to first logout and login again to see the updated info. even refreshing the page does not show the new info. Please tell me where the problem is as i am new to php

My Form test.php

<?PHP require_once("./include/membersite_config.php"); if(!$fgmembersite->CheckLogin()) { $fgmembersite->RedirectToURL("login.php"); exit; } ?>
Name:


Email:


Address:


Submit

my editform.php page

<?php $con = mysqli_connect("localhost","user","password","database"); if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } mysqli_query($con,"UPDATE fgusers3 SET name = '".$_POST['name']."', email= '".$_POST['email']."', address= '".$_POST['address']."' WHERE id_user='".$_POST['id_user']."'"); header("Location: test.php"); ?>

Are you using some kind of framework?

[php]

<?PHP require_once("./include/membersite_config.php"); if(!$fgmembersite->CheckLogin()) { $fgmembersite->RedirectToURL("login.php"); exit; }[/php] The reason I ask and suspect that you are is this portion of the script that is above. An the reason I ask is it will help people understand your problem a little bit better in order to solve your problem, I think? If you're not show the class and how you load your class.
Sponsor our Newsletter | Privacy Policy | Terms of Service