Moderators: macek, egami, gesf



Oleg is a bit sarcastic sometimes, I can be very mean if i get pissed and gesf.. gesf is just and angel... (You know, nice sweet guy with something heavy to smack those who do not follow the rules and double post)


<form enctype="multipart/form-data" action="uploader.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload: <input name="uploadedfile" type="file" /><br />
<input type="submit" value="Upload File" />
</form><?
$target_path = "uploads/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_F ILES['uploadedfile']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
} else{
echo "There was an error uploading the file, please try again!";
}
?>


<?php
error_reporting(E_ALL);
$target_path = "uploads/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_F ILES['uploadedfile']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
}
else{
echo "There was an error uploading the file, please try again!";
}
echo $target_path;
?>

friendly37 wrote:hi
i have you used your php script and get this reply
Parse error: parse error, unexpected T_STRING in /home/wheredat/public_html/uploader.php on line 1
someone who has given me this scripot asks me to chage the chmod to 777. i did it but in vain.
well please I amusing a linux platform. you know i have no idea what is the difference between linus or windows platforms.
if you can check again I will be grateful.
please if you know a formmail that do the job and upload a picture send it to me. thank you





Return to PHP coding => Images
Users browsing this forum: No registered users and 1 guest