Hello everybody,
Im a beginner in PHP and i'm thinking how i can make more things on my own made upload script:
Sorry if this is the wrong forum or if its not allowed to ask for script help/reqeusts.
[PHP]
<?php
if (isset($_POST['uploadedfile'])) {
if($_POST['uploadedfile'] == NULL) {
die();
}
$target_path = "images/profiles/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploade d_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo "<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=profile.msn w?epuid=$regcoo kie\">";
} else{
echo "There was an error uploading the file, please try again!";
}
} else {
echo "
<font color=\"#064f84 \" face=\"Tahoma\" size=\"2\"><b>P rofile photo</b></font>
<br>
<br>
<span class=\"style10 \">
<font face=\"Tahoma\" size=\"2\">
Upload your own photo to your profile, Click on browse, Select your photo and press Upload!</b>
<br><br>
<form enctype=\"multi part/form-data\" method=\"POST\" action=\"$PHP_S ELF?action=dpph ots\">
<input type=\"hidden\" name=\"MAX_FILE _SIZE\" value=\"100000\ " />
Choose a image to upload: <input name=\"uploaded file\" type=\"file\" /><br /><br />
<input type=\"submit\" value=\"Upload File\" />
</form></font>
</span>
";
}
?>
[/PHP]
How can i add like file types and size limits, and reondom usernames. btw, this script is not working, Im just a beginner who wants to learn and get help.
Thanks in advance.
Im a beginner in PHP and i'm thinking how i can make more things on my own made upload script:
Sorry if this is the wrong forum or if its not allowed to ask for script help/reqeusts.
[PHP]
<?php
if (isset($_POST['uploadedfile'])) {
if($_POST['uploadedfile'] == NULL) {
die();
}
$target_path = "images/profiles/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploade d_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo "<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=profile.msn w?epuid=$regcoo kie\">";
} else{
echo "There was an error uploading the file, please try again!";
}
} else {
echo "
<font color=\"#064f84 \" face=\"Tahoma\" size=\"2\"><b>P rofile photo</b></font>
<br>
<br>
<span class=\"style10 \">
<font face=\"Tahoma\" size=\"2\">
Upload your own photo to your profile, Click on browse, Select your photo and press Upload!</b>
<br><br>
<form enctype=\"multi part/form-data\" method=\"POST\" action=\"$PHP_S ELF?action=dpph ots\">
<input type=\"hidden\" name=\"MAX_FILE _SIZE\" value=\"100000\ " />
Choose a image to upload: <input name=\"uploaded file\" type=\"file\" /><br /><br />
<input type=\"submit\" value=\"Upload File\" />
</form></font>
</span>
";
}
?>
[/PHP]
How can i add like file types and size limits, and reondom usernames. btw, this script is not working, Im just a beginner who wants to learn and get help.
Thanks in advance.
Comment