I would like to use a popup to upload a file and then to also
set $_SESSION values. These values should be saved after the
popup closes so that they can be used to fill fields in the main page.
The popup, below, is not saving the $_SESSION values.
How can this be fixed?
<html xmlns="
http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<?php
if(!empty($_FILES) ){
$_SESSION['name']=$_FILES[
'in_file']
['name'];
echo $_SESSION['name']; //for testing
}
?>
</head>
<body>
<script language="javascript" type="text/javascript">
function popitup(url) {
newwindow=window.open(url,
'name','he
ight=200,w
idth=150')
;
if (window.focus) {newwindow.focus()}
return false;
}
</script>
<input type="file" name="in_file" id="in_file">
<input type="submit" name="submit">
</body>
</html>
http://uk3.php.net/manual/en/function.session-start.php