Excellent! Thank you for the help..... I am getting a blank page on Page 2 though.....
Here is Page 1
<?php session_start();
$_SESSION['userfile'];
?>
<html>
<body>
<form action="page2.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="2000000">
<input name="userfile" type="file" id="userfile">
<input name="upload" type="submit" class="box" id="upload" value=" Upload "></td>
</form>
</body>
</html>
Page 2
<?php
session_start();
$_SESSION['userfile'];
$uploadDir = 'upload/';
if(isset($_POST['upload']))
{
$fileName = $_FILES['userfile']['name'];
$tmpName = $_FILES['userfile']['tmp_name'];
$fileSize = $_FILES['userfile']['size'];
$fileType = $_FILES['userfile']['type'];
$filePath = $uploadDir . $fileName;
$result = move_uploaded_file($tmpName, $filePath);
if (!$result) {
echo "Error uploading file";
exit;
}
else
{
$_SESSION['uploadedfilepath']=$filePath;
}
$_SESSION['userfile']=$_POST;
?>
<html>
<body>
<form action="insert.php" method="post">
<input type="text" name="first" id="first" />
<input type="submit" name="button" id="button" value="Submit" />
</form>
</body>
</html>
Am I missing something simple?
-Scott
Last edited by peter_budo : May 14th, 2008 at 2:58 pm. Reason: Keep It Organized - please use [code] tags