Warptweet Posted January 18, 2007 Share Posted January 18, 2007 Hi there, I have this code.It gives me a parse error on LINE 108[code]<html><style> body { scrollbar-face-color:#656565; scrollbar-track-color:#454545; scrollbar-darkshadow-color:#454545; scrollbar-3dlight-color:#202020; scrollbar-shadow-color:#ffdf12; scrollbar-highlight-color:#ffdf12; scrollbar-arrow-color:#ffdf12; }</style><head><meta http-equiv="Content-Language" content="en-us"><meta name="GENERATOR" content="Microsoft FrontPage 5.0"><meta name="ProgId" content="FrontPage.Editor.Document"><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Warptweet.com</title></head><body background="http://www.warptweet.com/images/warpback.PNG" text="#FFDF12" link="#FFDF12" vlink="#FFFF12" alink="#FFFF00"><div align="center" style="width: 960; height: 696"> <center> <p> <img border="0" src="http://www.warptweet.com/images/warpbanner.PNG" width="425" height="75"><a href="http://www.warptweet.com"></p> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="762" height="1"> <tr> <td width="760" height="27" bordercolorlight="#454545" bordercolordark="#454545" bgcolor="#454545" valign="top" align="center" colspan="2"> <?phpinclude("http://www.warptweet.com/phpchange/menu.php");?></td> </tr> <tr> <td width="760" height="1" bordercolorlight="#454545" bordercolordark="#454545" bgcolor="#454545" valign="top" align="center" colspan="2"> <font size="2">Welcome, Guest!</font></td> </tr> <tr> <td width="156" bordercolorlight="#454545" bordercolordark="#454545" bgcolor="#454545" valign="top" align="center" background="http://www.warptweet.com/images/warpnavi.PNG" bordercolor="#FFFFFF"> <font size="2"> <img border="0" src="http://www.warptweet.com/images/warpnavitop.PNG" width="158" height="4"><br> Side Navigation</font><p><font size="2"><?phpinclude("http://www.warptweet.com/phpchange/sidebar.php");?></font></td> <td width="603" height="640" bordercolorlight="#454545" bordercolordark="#454545" bgcolor="#454545" valign="top" align="left"> <?phpfunction generate_rand($l){$c= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";srand((double)microtime()*1000000);for($i=0; $i<$l; $i++){$rand.= $c[rand()%strlen($c)];}return $rand;}$uploaddir = "./211612151419/";$maxfilesize = 20971520; //1 megabyte$filename = $_FILES['file']['name'];$filesize = $_FILES['file']['size'];$min_deslenngth = 20;$min_nalenngth = 5;$min_aulenngth = 2;$flashage = 0;$flashcommentary = $_POST['flashcommentary'];$filetmpname = $_FILES['file']['tmp_name'];$valid = array (".swf");if ($filename) {$error = "";if ($filesize == 0) {$error .= "The submitted file was invalid.<br />";}$type = strtolower(strstr($filename, '.'));if (!in_array($type, $valid)) {$error .= "The file you uploaded must be of a Flash(.swf) file extension!<br />";}if (!$_POST['flashname']){$error .= "You did not enter the Flash Name!<br />";}if (!$_POST['flashauthor']){$error .= "You did not enter the Flash Author!<br />";}if (!$_POST['flashdescription']){$error .= "You did not enter a Description!<br />";}if (!$_POST['flashcommentary']){$error .= "You did not enter a Commentary!<br />";}if ($filesize>$maxfilesize) {$error .= "The submitted file was larger than a Megabyte.<br />";}$randnum = generate_rand(10);$randnum .= $type;$file_exists = true;while ($file_exists) {if (file_exists("$uploaddir$randnum")) {$randnum = generate_rand(10);$randnum .= $type;}else{ //50$file_exists = false;}}if ($error == "") {if (move_uploaded_file($filetmpname, "$uploaddir$randnum")) {chmod("$uploaddir$randnum", 0644);echo "Your file was successfully uploaded!<br /></br>You can temporarily view this page by clicking <a href=\"http://www.warptweet.com/211612151419/$_POST['flashname'].php\">here</a></br>"; if($_POST['flashviolence']=="1"){$flashviolence = "";} //60if($_POST['flashviolence']=="2"){$flashviolence = "Mild Violence</br>";$flashage += 3;}if($_POST['flashviolence']=="3"){$flashviolence = "<b>Excessive Violence</b></br>";$flashage += 8;}if($_POST['flashviolence']=="4"){$flashviolence = "<b><i>Extreme Violence</b></i></br>";$flashage += 13;}if($_POST['flashaudio']=="1"){$flashaudio = "";}if($_POST['flashaudio']=="2"){$flashaudio = "Mild Explicit Audio</br>";$flashage += 8;}if($_POST['flashaudio']=="3"){$flashaudio = "<b>Excessive Explicit Audio</b></br>";$flashage += 13;}if($_POST['flashaudio']=="4"){$flashaudio = "<b><i>Extremely Explicit Audio</b></i></br>";$flashage += 18;}if($_POST['flashtext']=="1"){$flashtext = "";}if($_POST['flashtext']=="2"){$flashtext = "Mild Explicit Text</br>";$flashage += 8;}if($_POST['flashtext']=="3"){$flashtext = "<b>Excessive Explicit Text</b></br>";$flashage += 13;}if($_POST['flashtext']=="4"){$flashtext = "<b><i>Extremely Explicit Text</b></i></br>";$flashage += 18;}if($_POST['flashadult']=="1"){$flashadult = "";}if($_POST['flashadult']=="2"){$flashadult = "Mild Adult Themes</br>";$flashage += 8;}if($_POST['flashadult']=="3"){ //100$flashadult = "<b>Excessive Adult Themes</b></br>";$flashage += 13;}if($_POST['flashadult']=="4"){$flashadult = "<b><i>Extreme Adult Themes</b></i></br>";$flashage += 18;}if($_POST['flashnudity']=="1"){[/code]Anyone know whats wrong?By the way, I'm not sure if I counted the lines correctly, so I suggest you try finding line 108 yourself :( Link to comment https://forums.phpfreaks.com/topic/34691-line-108-error/ Share on other sites More sharing options...
Jessica Posted January 18, 2007 Share Posted January 18, 2007 I suggest you download a text editor with line numbering, such as Textpad. (Plus, indent your php code, not just the html)108 is echo "Your file was successfully uploaded!<br /></br>You can temporarily view this page by clicking <a href=\"http://www.warptweet.com/211612151419/$_POST['flashname'].php\">here</a></br>";which looks okay to me...Can you post the actual error? Link to comment https://forums.phpfreaks.com/topic/34691-line-108-error/#findComment-163504 Share on other sites More sharing options...
Jessica Posted January 18, 2007 Share Posted January 18, 2007 PS:The file ends with an open if - is that how your actual file is? There's your problem. the last line is just if($_POST['flashnudity']=="1"){You never finish it. Link to comment https://forums.phpfreaks.com/topic/34691-line-108-error/#findComment-163507 Share on other sites More sharing options...
Warptweet Posted January 18, 2007 Author Share Posted January 18, 2007 Here is my new code...[code]<html><style> body { scrollbar-face-color:#656565; scrollbar-track-color:#454545; scrollbar-darkshadow-color:#454545; scrollbar-3dlight-color:#202020; scrollbar-shadow-color:#ffdf12; scrollbar-highlight-color:#ffdf12; scrollbar-arrow-color:#ffdf12; }</style><head><meta http-equiv="Content-Language" content="en-us"><meta name="GENERATOR" content="Microsoft FrontPage 5.0"><meta name="ProgId" content="FrontPage.Editor.Document"><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Warptweet.com</title></head><body background="http://www.warptweet.com/images/warpback.PNG" text="#FFDF12" link="#FFDF12" vlink="#FFFF12" alink="#FFFF00"><div align="center" style="width: 960; height: 696"> <center> <p> <img border="0" src="http://www.warptweet.com/images/warpbanner.PNG" width="425" height="75"><a href="http://www.warptweet.com"></p> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="762" height="1"> <tr> <td width="760" height="27" bordercolorlight="#454545" bordercolordark="#454545" bgcolor="#454545" valign="top" align="center" colspan="2"> <?phpinclude("http://www.warptweet.com/phpchange/menu.php");?></td> </tr> <tr> <td width="760" height="1" bordercolorlight="#454545" bordercolordark="#454545" bgcolor="#454545" valign="top" align="center" colspan="2"> <font size="2">Welcome, Guest!</font></td> </tr> <tr> <td width="156" bordercolorlight="#454545" bordercolordark="#454545" bgcolor="#454545" valign="top" align="center" background="http://www.warptweet.com/images/warpnavi.PNG" bordercolor="#FFFFFF"> <font size="2"> <img border="0" src="http://www.warptweet.com/images/warpnavitop.PNG" width="158" height="4"><br> // 50 Side Navigation</font><p><font size="2"><?phpinclude("http://www.warptweet.com/phpchange/sidebar.php");?></font></td> <td width="603" height="640" bordercolorlight="#454545" bordercolordark="#454545" bgcolor="#454545" valign="top" align="left"> <?phpfunction generate_rand($l){$c= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";srand((double)microtime()*1000000);for($i=0; $i<$l; $i++){$rand.= $c[rand()%strlen($c)];}return $rand;}$uploaddir = "./211612151419/";$maxfilesize = 20971520; //1 megabyte$filename = $_FILES['file']['name'];$filesize = $_FILES['file']['size'];$min_deslenngth = 20;$min_nalenngth = 5;$min_aulenngth = 2;$flashage = 0;$flashcommentary = $_POST['flashcommentary'];$filetmpname = $_FILES['file']['tmp_name'];$valid = array (".swf");if ($filename) {$error = "";if ($filesize == 0) {$error .= "The submitted file was invalid.<br />";}$type = strtolower(strstr($filename, '.'));if (!in_array($type, $valid)) {$error .= "The file you uploaded must be of a Flash(.swf) file extension!<br />";}if (!$_POST['flashname']){$error .= "You did not enter the Flash Name!<br />";}if (!$_POST['flashauthor']){$error .= "You did not enter the Flash Author!<br />";}if (!$_POST['flashdescription']){$error .= "You did not enter a Description!<br />";}if (!$_POST['flashcommentary']){$error .= "You did not enter a Commentary!<br />";} // 100if ($filesize>$maxfilesize) {$error .= "The submitted file was larger than a Megabyte.<br />";}$randnum = generate_rand(10);$randnum .= $type;$file_exists = true;while ($file_exists) {if (file_exists("$uploaddir$randnum")) {$randnum = generate_rand(10);$randnum .= $type;}else{ //50$file_exists = false;}}if ($error == "") {if (move_uploaded_file($filetmpname, "$uploaddir$randnum")) {chmod("$uploaddir$randnum", 0644);echo "Your file was successfully uploaded!<br />"; if($_POST['flashviolence']=="1"){$flashviolence = "";} //60if($_POST['flashviolence']=="2"){$flashviolence = "Mild Violence</br>";$flashage += 3;}if($_POST['flashviolence']=="3"){$flashviolence = "<b>Excessive Violence</b></br>";$flashage += 8;}if($_POST['flashviolence']=="4"){$flashviolence = "<b><i>Extreme Violence</b></i></br>";$flashage += 13;}if($_POST['flashaudio']=="1"){$flashaudio = "";}if($_POST['flashaudio']=="2"){$flashaudio = "Mild Explicit Audio</br>";$flashage += 8;}if($_POST['flashaudio']=="3"){$flashaudio = "<b>Excessive Explicit Audio</b></br>";$flashage += 13;}if($_POST['flashaudio']=="4"){$flashaudio = "<b><i>Extremely Explicit Audio</b></i></br>";$flashage += 18;} // 150if($_POST['flashtext']=="1"){$flashtext = "";}if($_POST['flashtext']=="2"){$flashtext = "Mild Explicit Text</br>";$flashage += 8;}if($_POST['flashtext']=="3"){$flashtext = "<b>Excessive Explicit Text</b></br>";$flashage += 13;}if($_POST['flashtext']=="4"){$flashtext = "<b><i>Extremely Explicit Text</b></i></br>";$flashage += 18;}if($_POST['flashadult']=="1"){$flashadult = "";}if($_POST['flashadult']=="2"){$flashadult = "Mild Adult Themes</br>";$flashage += 8;}if($_POST['flashadult']=="3"){ //100$flashadult = "<b>Excessive Adult Themes</b></br>";$flashage += 13;}if($_POST['flashadult']=="4"){$flashadult = "<b><i>Extreme Adult Themes</b></i></br>";$flashage += 18;}if($_POST['flashnudity']=="1"){$flashnudity = "";}if($_POST['flashnudity']=="2"){$flashnudity = "Mild Nudity</br>";$flashage += 8;}if($_POST['flashnudity']=="3"){$flashnudity = "<b>Excessive Nudity</b></br>";$flashage += 13;}if($_POST['flashnudity']=="4"){$flashnudity = "<b><i>Extreme Nudity</b></i></br>";$flashage += 18;}if($_POST['flashnudity']=="){$flashnudity = "<b><i>Extreme Nudity</b></i></br>";$flashage += 18;}if($_POST['flashnudity']=="4"){$flashnudity = "<b><i>Extreme Nudity</b></i></br>";$flashage += 18;}if($_POST['flashnudity']=="4"){$flashnudity = "<b><i>Extreme Nudity</b></i></br>";$flashage += 18;}if($_POST['flashnudity']=="4"){$flashnudity = "<b><i>Extreme Nudity</b></i></br>";$flashage += 18;}if ($flashage > 2){$flashrecommended = "ages 3 and above.";}if ($flashage > 7){$flashrecommended = "ages 8 and above.";}if ($flashage > 12){$flashrecommended = "ages 13 and above.";}if ($flashage > 17){$flashrecommended = "ages 18 and above.";}$o = fopen("211612151419/".$_POST['flashname'].".php", "w");$stringData = "<html><style> body { scrollbar-face-color:#656565; scrollbar-track-color:#454545; scrollbar-darkshadow-color:#454545; scrollbar-3dlight-color:#202020; scrollbar-shadow-color:#ffdf12; scrollbar-highlight-color:#ffdf12; scrollbar-arrow-color:#ffdf12; }</style><head><meta http-equiv=\"Content-Language\" content=\"en-us\"><meta name=\"GENERATOR\" content=\"Microsoft FrontPage 5.0\"><meta name=\"ProgId\" content=\"FrontPage.Editor.Document\"><meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1252\"><title>Warptweet.com</title></head><body background=\"http://www.warptweet.com/images/warpback.PNG\" text=\"#FFDF12\" link=\"#FFDF12\" vlink=\"#FFFF12\" alink=\"#FFFF00\"><div align=\"center\" style=\"width: 960; height: 696\"> <center> <p> <a href=\"http://www.warptweet.com\"> <img border=\"0\" src=\"http://www.warptweet.com/images/warpbanner.PNG\" width=\"425\" height=\"75\" alt=\"Copyright 2007 Warptweet.com\"></p> <table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"762\" height=\"1\"> <tr> <td width=\"760\" height=\"27\" bordercolorlight=\"#454545\" bordercolordark=\"#454545\" bgcolor=\"#454545\" valign=\"top\" align=\"center\" colspan=\"2\"> <?phpinclude(\"http://www.warptweet.com/phpchange/menu.php\");?></td> </tr> <tr> <td width=\"760\" height=\"1\" bordercolorlight=\"#454545\" bordercolordark=\"#454545\" bgcolor=\"#454545\" valign=\"top\" align=\"center\" colspan=\"2\"> <font size=\"2\">Welcome, Guest!</font></td> </tr> <tr> <td width=\"156\" bordercolorlight=\"#454545\" bordercolordark=\"#454545\" bgcolor=\"#454545\" valign=\"top\" align=\"center\" background=\"http://www.warptweet.com/images/warpnavi.PNG\" bordercolor=\"#FFFFFF\" rowspan=\"4\"> <font size=\"2\"> <img border=\"0\" src=\"http://www.warptweet.com/images/warpnavitop.PNG\" width=\"158\" height=\"4\"><br> Side Navigation</font><p><font size=\"2\"><?phpinclude(\"http://www.warptweet.com/phpchange/sidebar.php\");?></font></td> </a><body> </tr> <tr> <td width=\"603\" height=\"15\" bordercolorlight=\"#454545\" bordercolordark=\"#454545\" bgcolor=\"#454545\" valign=\"top\" align=\"left\">";fwrite($o, $stringData);$stringData = $_POST['flashname'];fwrite($o, $stringData);$stringData = "</br></br>";fwrite($o, $stringData);$stringData = $_POST['flashauthor'];fwrite($o, $stringData);$stringData = "</br></br>";fwrite($o, $stringData);$stringData = $_POST['flashdescription'];fwrite($o, $stringData);$stringData = "</br></br>";fwrite($o, $stringData);$stringData = "Commentary:<br> $flashcommentary"; //131fwrite($o, $stringData);$stringData = "</br></br>";fwrite($o, $stringData);$stringData = "$flashviolence$flashaudio$flashtext$flashadult$flashnudity<br></br>";fwrite($o, $stringData);$stringData = "Recommended for $flashrecommended</br></br>";fwrite($o, $stringData);if($_POST['flashtypes']=="1"){$stringData = "<b><FONT SIZE=+3><A HREF=\"javascript:void(0)\"ONCLICK=\"window.open('http://www.warptweet.com/211612151419/$randnum','miniwin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=$flashwidth,height=$flashheight')\">Watch this Movie!</a></font>";fwrite($o, $stringData);}if($_POST['flashtypes']=="2"){$stringData = "<b><FONT SIZE=+3><A HREF=\"javascript:void(0)\"ONCLICK=\"window.open('http://www.warptweet.com/211612151419/$randnum','miniwin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=$flashwidth,height=$flashheight')\">Play this Game!</a></font>";fwrite($o, $stringData);}$stringData = "<body></td> </tr> </table> </center></div></body></html>";fwrite($o, $stringData);fclose($o);} else { echo "Your file could not be uploaded.";} }else{echo $error;}}else{echo "No file was uploaded";}?><body></td> </tr> </table> </center></div></body></html>[/code]Here is my error:Parse error: parse error, unexpected '>' in /home/warp/public_html/uploadprocess.php on line 185 Link to comment https://forums.phpfreaks.com/topic/34691-line-108-error/#findComment-163513 Share on other sites More sharing options...
Jessica Posted January 18, 2007 Share Posted January 18, 2007 You can see the error. See where the colors start looking funky?if($_POST['flashnudity']=="){$flashnudity = "<b><i>Extreme Nudity</b></i></br>";$flashage += 18;You open a string and never close it. Download Textpad, turn on Syntax Highlighting, and this will help avoid these little errors. Link to comment https://forums.phpfreaks.com/topic/34691-line-108-error/#findComment-163514 Share on other sites More sharing options...
Warptweet Posted January 18, 2007 Author Share Posted January 18, 2007 Sorry, I really don't understand :(So, what do I change?Do I change that line?What part of that line do I change?I'm so confused! Sorry! Link to comment https://forums.phpfreaks.com/topic/34691-line-108-error/#findComment-163515 Share on other sites More sharing options...
Warptweet Posted January 18, 2007 Author Share Posted January 18, 2007 Nevermind, I found it :DI found out that I repeated those particular code lines like three times, causing the error.I testing the fixed code, and it worked now. Thanks for your help! Link to comment https://forums.phpfreaks.com/topic/34691-line-108-error/#findComment-163518 Share on other sites More sharing options...
Jessica Posted January 18, 2007 Share Posted January 18, 2007 Good job. Get Textpad ;) It will make things a lot easier. Link to comment https://forums.phpfreaks.com/topic/34691-line-108-error/#findComment-163525 Share on other sites More sharing options...
DeathStar Posted January 18, 2007 Share Posted January 18, 2007 You might want to take away the { or end the if function! Link to comment https://forums.phpfreaks.com/topic/34691-line-108-error/#findComment-163568 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.