Easy 10 points need help with php file upload script?

Juan Colt

New member
I need some help with making an upload script to work, I want it to upload to the directory files... If you can make the PHP script work for me that would be great, you would get an easy 10 pts

Here is the script

<?php
$target = "upload/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$ok=1;

//This is our size condition
if ($uploaded_size > 350000)
{
echo "Your file is too large.<br>";
$ok=0;
}

//This is our limit file type condition
if ($uploaded_type =="text/php")
{
echo "No PHP files<br>";
$ok=0;
}

//Here we check that $ok was not set to 0 by an error
if ($ok==0)
{
Echo "Sorry your file was not uploaded";
}

//If everything is ok we try to upload it
else
{
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
}
else
{
echo "Sorry, there was a problem uploading your file.";
}
}
?>
I get this error when trying to upload

Fatal error: Call to undefined function net() in /hermes/web06b/b1104/moo.generationnexnet/upload.php on line 3
 
Back
Top