Jump to content

wasper-rocker

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

wasper-rocker's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Now This error comes up: "Sorry your file was not uploaded Warning: move_uploaded_file(www.wasper-rocker.co.uk/Protected/uploaded/henry-head.gif): failed to open stream: No such file or directory in /home/i04wasp/public_html/uploaded.php on line 27 Warning: move_uploaded_file(): Unable to move '/tmp/php8u813W' to 'www.wasper-rocker.co.uk/Protected/uploaded/henry-head.gif' in /home/i04wasp/public_html/uploaded.php on line 27 Sorry, there was a problem uploading your file." Even though the file does exist. Also i can only upload .gif files
  2. I am running this script to get a file uploaded to a directory on my server but it just comes up with this error. [code]<?php $target = "www.wasper-rocker.co.uk/Protected/uploaded/"; $target = $target . basename( $_FILES['uploaded']['name']); if ($uploaded_size > 250000) { echo "Your file is too large.<br>"; $ok=0; }  if (!($uploaded_type=="image/gif"))  { if (!($uploaded_type=="image/jpeg")) { echo "You may only upload Image files.<br>"; $ok=0; } } if ($ok==0) { Echo "Sorry your file was not uploaded"; } if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; $con = mysql_connect("localhost","i04wasp_duncan","WASP5rock"); if (!$con)   {   die('Could not connect: ' . mysql_error());   } mysql_select_db("i04wasp_", $con); $sql="INSERT INTO account (picname) VALUES ('$_POST[nickname]$_FILES['uploadedfile']['name'])} else { echo "Sorry, there was a problem uploading your file."; } ?> [/code] Error: "Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/i04wasp/public_html/uploaded.php on line 42"
  3. I am such an idiot I have spent ages searching through this to find the error and its simple!!! Thankyou so much!!
  4. Please Help Me I do not understand why this error keeps appearing when i run the script. Error: "Parse error: syntax error, unexpected $end in /home/i04wasp/public_html/process.php on line 38" Script: <html><body> <?php $con = mysql_connect("localhost","i04wasp_duncan","WASP5rock"); if (!$con)   {   die('Could not connect: ' . mysql_error());   } mysql_select_db("i04wasp_", $con);$sql="INSERT INTO account (username,password,realname,email,gender,mainfo,tc,allowemail) VALUES ('$_POST[nickname]', '$_POST[password]', '$_POST[realname]', '$_POST[email]', '$_POST[gender]', '$_POST[mainfo]', '$_POST[tc]', '$_POST[allowemail]') ";if (!mysql_query($sql,$con))   {   die('Error: ' . mysql_error());   }   else   echo "Account Successfully Created!> ?> <form action='upload.php' method='post'> <INPUT TYPE='submit' VALUE='Upload A File'> </form> <form action='Protected/login.php' method='post'> <INPUT TYPE='submit' VALUE='Login Page'> </form> </body> </html>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.