Thanks Jason, that worked.
Two sized images are produced by the DFP. One is to appear on userupdate page and the other in another page within the same directory as userupdate page.
I noticed that although the profile image is immediately updated in the userupdate page, the other page only updates after logging out and logging in again. The photo in the other page uses session variable to update. Earlier you suggested resetting session variables and I was wondering whether this is what I need to do to ensure the photo in the other page updates simultaneously as the userupdate page.
Any suggestion?
Thanks!
The code referencing the photo in the other page is:
<?php require_once('../Connections/mfaccessConn.php'); ?>
<?php require_once( "../webassist/security_assist/helper_php.php" ); ?>
<?php
if (!WA_Auth_RulePasses("VerifiedUser")){
WA_Auth_RestrictAccess("userupdate.php");
}
?>
<?php
@session_start();
if (!isset($_SESSION["UserImage"])) {
$_SESSION["UserImage"] = "".$_SESSION['UserImage'] ."";
}
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_mfaccessConn, $mfaccessConn);
$query_rsProimage = "SELECT UserID, UserEmail, UserPassword, UserFirstName, UserLastName, UserImage, UserThumbnail FROM pcms2_users ORDER BY UserID ASC";
$rsProimage = mysql_query($query_rsProimage, $mfaccessConn) or die(mysql_error());
$row_rsProimage = mysql_fetch_assoc($rsProimage);
$totalRows_rsProimage = mysql_num_rows($rsProimage);?>
<!DOCTYPE HTML>
And the profile photo:
<div class="profileImage"><img src="../_images/userprofile/<?php echo $_SESSION['UserImage']; ?>" name="cppmf100" width="120" height="120" id="cppmf100"></div>


