php session and mysql update
<p>am building a social network, i use php session to allow info to stay on the pages when the user goes to another page, however when the mysql script to update a value. it does reflect the change made unless the user log out and log back in. any ideas?</p>

<p>thanks . . .</p>

<pre><code>&lt;?php

session_start();

$login_email = $_SESSION['email'] ;
$login_pass = $_SESSION['pass'] ;

$target_path = "pictures/";

$target_path = $target_path . basename( $_FILES['file']['name']); 

if (move_uploaded_file($_FILES['file']['tmp_name'], $target_path) and

   $con = mysql_connect("localhost","root","naruto") and 

    mysql_select_db("users", $con) and 

    mysql_query (" UPDATE user_info SET profile_pic = ' $target_path ' WHERE email = '$login_email' AND password1 = '$login_pass' " ) ) {

        session_destroy ();

        include 'login.php';

        session_start ();

 if ( $login_email == $_SESSION['page_email'] &amp;&amp; $login_pass == $_SESSION['page_pass ']){       


        header ('location:home.php');

} else{

    echo "There was an error uploading the file, please try again!";
}

    }



?&gt;
</code></pre>

<p>$_SESSION['page_email'] 
$_SESSION['page_pass '] </p>
