Jump to content

Going to rip my eyes out...


Rifts

Recommended Posts

Parse error: syntax error, unexpected '{' in /home/content/54/6407054/html/test/adupload.php on line 31

<?

include 'include/config.php';

$email = $_POST['email'];

$code = $_POST['code'];

$link = $_POST['link'];

$sql = ( "SELECT * FROM ads WHERE email='$email' and code='$code' ");

$result = mysql_query($sql);

$count = mysql_num_rows($result);



if ((($_FILES["file"]["type"] == "image/gif")

|| ($_FILES["file"]["type"] == "image/jpeg")

|| ($_FILES["file"]["type"] == "image/png")

|| ($_FILES["file"]["type"] == "image/jpg")

|| ($_FILES["file"]["type"] == "image/pjpeg"))

&& ($_FILES["file"]["size"] < 5000000))

  {

  if ($_FILES["file"]["error"] > 0)

    {

    echo "Return Code: " . $_FILES["file"]["error"] . "<br />";

    }

  else

    {

$_FILES["file"]["name"] = str_replace(" ", "_", $_FILES["file"]["name"]);

   



    if (file_exists("images/ads/" . $_FILES["file"]["name"]))

      {

      echo $_FILES["file"]["name"] . " already exists. ";

      }

    else ($count==1)

      {

      move_uploaded_file($_FILES["file"]["tmp_name"],

      "images/ads/" . $_FILES["file"]["name"]);

  $name = $_FILES["file"]["name"];



	}



  header("Location: http://www.google.com");

  

      }

  }
}
else

  {

  echo "Invalid file";

  }
  


?>

 

 

line 31 is here

 

 

29:  && ($_FILES["file"]["size"] < 5000000))

30:

31:    {

32:

33:  if ($_FILES["file"]["error"] > 0)

 

Link to comment
https://forums.phpfreaks.com/topic/220943-going-to-rip-my-eyes-out/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.