Jump to content

Recommended Posts

am still battling with uploading files. it just wont work.this is the index<!DOCTYPE html><html><head><title>Brave Heart</title></head><body><form action="action.php" method="post" class="test1" enctype="multipart/form-data"><label for="file">Filename:</label><input type="file" name="file" id="file"><br><input type="submit" name="submit" value="upload file"></form></body></html> and the upload script<!DOCTYPE html><html><head><title>Backend</title> </head><body> <?phpif ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"]["error"] . "<br>"; }else { echo "Upload: " . $_FILES["file"]["name"] . "<br>"; echo "Type: " . $_FILES["file"]["type"] . "<br>"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>"; echo "Stored in: " . $_FILES["file"]["tmp_name"]; }?></body></html> please help .thanks

Link to comment
Share on other sites

About Post #5: What results are you getting? Does your error message echo? Have you tried turning on error reporting? Have you tried var_dump($_FILES) to see what, if anything, arrives at your server?

Edited by Deirdre's Dad
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...