
Originally Posted by
Darkregionlord
The things I like are in blue. The thijngs I dislike are in red. Purple is I don't have an opinion.
NOOO! THAT IS WRONG!!!!
THAT IS HTML CODE!(with a dash of BBCODE) NOT PHP!! REPLACE THE [PHP] with [CODE]
THIS is REAL php
PHP Code:
<?php
$target = "upload/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$ok=1;
if ($uploaded_size > 350000)
{
echo "Your file is too large.<br>";
$ok=0;
}
if ($uploaded_type =="text/php")
{
echo "No PHP files<br>";
$ok=0;
}
if ($ok==0)
{
Echo "Sorry your file was not uploaded";
}
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.";
}
}
?>
Bookmarks