I have this upload script where web visitors can upload files to my web site. At the end of the upload script page they are automatically re-directed to another page. However, when I tested this I was able to open my browser and go back to the upload page after being re-directed.

I'd like it so that after uploading, the user is logged-out so he can't go back to that page withour logging-in again.

On the main menu, a user can manually log-out, by selecting Log Out which uses the line of code: <A href='index.php?command=account&param=logout'>

My question is how do I automatically get the user logged out? Under "Location" in the code below, would it be correct to replace the re-direction code:

header("Location: http://www.someotherplace.com");

with this:

header("Location: A href='index.php?command=account&param=logout');

or would that code be incorrect?

I posted the last part of the code page below. Thanks for your help.
Ideally, it would be great to automatically have the user log-out and be redirected somewhere.

Code:
function upload_file($upload_directory, $upload_uri) {global $account;
        $file_name = $_FILES["userfile"]["name"];
	$file_name = str_replace(" ","_",$file_name);
	$ext=pathinfo($file_name,PATHINFO_EXTENSION);
        $file_name = basename($file_name, '.' . $ext);
        $file_path = $upload_directory. $file_name.'-'. $account->get_user_name().'.'.$ext;

	$temporary = $_FILES["userfile"]["tmp_name"];

	$result = move_uploaded_file($temporary, $file_path);
	if(!chmod($file_path,0777))
	$message = "ERROR: A folder to place the files was not found, or the files need to be CHMODed to 777.";
	else $message = ($result)?"File has been uploaded." : "An error has occurred.";

	header("Location: http://www.someotherplace.com");
	exit();

	return $message;
	}
?>