It says i have a parse error around about
: if (move_uploaded_file($_FILES[...
PHP Code:
IF ($action=="upload")
{
echo "<form name=\"upload\" method=\"post\" action=\"admin.php?action=upload2\" enctype=\"multipart/form-data\">";
echo "<input type=\"file\" name=\"upload1\"><br>";
echo "<input type=\"file\" name=\"upload2\"><br>";
echo "<input type=\"file\" name=\"upload3\"><br>";
echo "<input type=\"file\" name=\"upload4\"><br>";
echo "<input type=\"file\" name=\"upload5\"><br>";
echo "<input type=\"submit\" name=\"Submit\" value=\"Go!\">";
echo "</form>";
}
IF ($action=="upload2")
{
$upload1 = $_POST['upload1'];
if(!empty($_FILES["userfile"])) {
$uploaddir = "/upload/" // set this to wherever
//copy the file to some permanent location
if (move_uploaded_file($_FILES["userfile"]["tmp_name"], $uploaddir . $_FILES["userfile"]["name"])) {
echo("file uploaded");
} else {
echo ("error!");
}
}
// Get file extension
$fileext = explode(".", $upload1);
$file_name = $fileext[0];
$file_ext = $fileext[1];
// End get file extension