• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Why is this not working right?

clamum

Lifer
See my code below. The part that's stumping me is why the

echo "session: " . $_SESSION["photo$cntn"] . ", " . $_SESSION["photo$cntu"] . "<br />";

line prints out the same name for both session variables. It's as if $_SESSION["photo$cntn"] was replaced with $_SESSION["photo$cntu"] in that line.

What's weird is that

echo $name . "<br />";
$_SESSION["photo$cntn"] = $name;
echo $unique_name . "<br />";
$_SESSION["photo$cntu"] = $unique_name;

Prints out correctly, i.e., the $_SESSION["photo$cntn"] and $_SESSION["photo$cntu"] are different like they should be. I'm trying to save the original filename and a uniquely generated (using the md5(uniqid(time())) function) filename in session variables and this has got me stumped. I must be missing something obvious but I don't know what it is. Any help would be appreciated.

Here's what gets printed out:

picturefile.jpg
9255247715adb28aa9970e5de9d61f63.jpg
session: 9255247715adb28aa9970e5de9d61f63.jpg, 9255247715adb28aa9970e5de9d61f63.jpg
 
Back
Top