Rifts Posted December 7, 2010 Share Posted December 7, 2010 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 More sharing options...
Pikachu2000 Posted December 7, 2010 Share Posted December 7, 2010 What's this? Should it be an elseif? else ($count==1) Link to comment https://forums.phpfreaks.com/topic/220943-going-to-rip-my-eyes-out/#findComment-1144062 Share on other sites More sharing options...
Rifts Posted December 7, 2010 Author Share Posted December 7, 2010 wow thanks Link to comment https://forums.phpfreaks.com/topic/220943-going-to-rip-my-eyes-out/#findComment-1144115 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.