Jump to content

New file name in a session variable. Is this correct?


Chrisj

Recommended Posts

In an Upload Form that I'm using, it has this line:

$newfilename = $SESSION['userid'].$_FILES["file"]["name"];

I need to "store the newfilename in a session variable" (in another php file)

and use the session variable in this link, instead of newfilename:

<a href="upload/<?php echo $newfilename?>"><?php echo $newfilename?></a>

So, would this be correct?

$newfilename = $_SESSION['newfilename'].$_FILES["newfilename"];

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.