dsaba Posted February 26, 2007 Share Posted February 26, 2007 i have this error: Parse error: syntax error, unexpected $end in /home/www/p2mhunt.awardspace.com/en_videoforminsert.php on line 335 i only have 328 lines in my script I searched it and someone said it is because of brackets or because of breaking php classes This boggles me because I don't know where to look, I have an idea of where I may have messed up an if/else statement by putting two elses[modified] i'll post that code, other than that i'm clueless if ($row['filename'] == $svideofilename) { echo 'This file has already been uploaded, try uploading another one<br>'; } else { $query1 = "INSERT INTO `mainfilelist` ( `filename`, `filegeneraltype_en`, `filegeneraltype_he`, `filegeneraltype_es`, `filegeneraltype_pt`, `filegeneraltype_pl`, `filespecifictype_en`, `filespecifictype_he`, `filespecifictype_es`, `filespecifictype_pt`, `filespecifictype_pl`, `filewallamirror_`, `fileyahoomirror`, `filegmailmirror`, `filelycosmirror`, `filelanguage_en`, `filelanguage_he`, `filelanguage_es`, `filelanguage_pt`, `filelanguage_pl`, `fileifsubtitles_en`, `fileifsubtitles_he`, `fileifsubtitles_es`, `fileifsubtitles_pt`, `fileifsubtitles_pl`, `filesubtitlelang_en`, `filesubtitlelang_he`, `filesubtitlelang_es`, `filesubtitlelang_pt`, `filesubtitlelang_pl`, `fileifpassword`, `filesubmitter`, `filedateadded`, `filetotalmirrors`, `filetemplateid`, `filesubmitlang`, `fileactive`, ) VALUES ( '$svideoname','$transgeneraltype_en','$transgeneraltype_he','$transgeneraltype_es','$transgeneraltype_pt','$transgeneraltype_pl','$transspecifictype_en','$$transspecifictype_he','$$transspecifictype_es','$$transspecifictype_pt','$$transspecifictype_pl','$svideowallamirror','$svideoyahoomirror','$$svideogmailmirror','$$svideolycosmirror','$transfilelanguage_en','$transfilelanguage_he','$transfilelanguage_es','$transfilelanguage_pt','$transfilelanguage_pl','$transfileifsubtitles_en','$transfileifsubtitles_he','$transfileifsubtitles_es','$transfileifsubtitles_pt','$transfileifsubtitles_pl','$transfilesubtitlelanguage_en','$transfilesubtitlelanguage_he','$transfilesubtitlelanguage_es','$transfilesubtitlelanguage_pt','$transfilesubtitlelanguage_pl','$svideoifpassword','$svideosubmitter','$svideodateadded','$svideototalmirrors','$svideofiletemplateid','$svideosubmitlang','$fileactive' )"; //get newly generated fileid from above process and make into a variable for below insertion $result = mysql_query("SELECT fileid FROM mainfilelist WHERE filename='$svideoname'"); $fetchedfileid = mysql_fetch_row($result); //second part of else statement $query2 = "INSERT INTO `videos` ( `videoname`, `videofileid`, `videogeneraltype_en`, `videogeneraltype_he`, `videogeneraltype_es`, `svideogeneraltype_pt`, `videogeneraltype_pl`, `videospecifictype_en`, `videospecifictype_he`, `videospecifictype_es`, `videospecifictype_pt`, `videospecifictype_pl`, `videosubmitter`, `videosubmitterip`, `videodateadded`, `videoifwalla`, `videoifyahoo`, `videoifgmail`, `videoiflycos`, `videowhatmirrors`, `videototalmirrors`, `videosubmitlang`, `videolanguage_en`, `videolanguage_he`, `videolanguage_es`, `videolanguage_pt`, `videolanguage_pl`, `videoifsubtitles_en`, `videoifsubtitles_he`, `videoifsubtitles_es`, `videoifsubtitles_pt`, `videoifsubtitles_pl`, `videosubtitlelang_en`, `videosubtitlelang_he`, `videosubtitlelang_es`, `videosubtitlelang_pt`, `videosubtitlelang_pl`, `videotemplateid`, `videohash1`, `videohash2`, `videodescription`, `videoimageurl1`, `videoimageurl2`,videoimageurl3 `videonumwalla`, `videonumyahoo`, `videonumgmail`, `videonumlycos`, `videosentfrom`, `videofileactive`, `videoifpassword`, `videopassword`, ) VALUES ( '$svideofilename', '$fetchedfileid', '$transgeneraltype_en', '$transgeneraltype_he', '$transgeneraltype_es', '$transgeneraltype_pt', '$transgeneraltype_pl', '$transspecifictype_en', '$transspecifictype_he', '$transspecifictype_es', '$transspecifictype_pt', '$transspecifictype_pl', '$svideofilesubmitter', '$svideofilesubmitterip', '$svideodateadded', '$svideoifwalla', '$svideoifyahoo', '$svideoifgmail', '$svideoiflycos', '$svideowhatmirrors', '$svideototalmirrors', '$transfilelanguage_en', '$transfilelanguage_he', '$transfilelanguage_es', '$transfilelanguage_pt', '$transfilelanguage_pl', '$transifsubtitles_en', '$transifsubtitles_he', '$transifsubtitles_es', '$transifsubtitles_pt', '$transifsubtitles_pl', '$transsubtitlelanguage_en', '$transsubtitlelanguage_he', '$transsubtitlelanguage_es', '$transsubtitlelanguage_pt', '$transsubtitlelanguage_pl', '$svideofiletemplateid', '$svideohash1', '$svideohash2', '$svideodescription', '$svideoimageurl1', '$svideoimageurl2', '$svideoimageurl3', '$svideonumwalla', '$svideonumyahoo', '$svideonumgmail', '$svideonumlycos', '$svideosentfrom', '$fileactive', '$svideoifpassword', '$svideopassword' )"; } Link to comment https://forums.phpfreaks.com/topic/40244-solved-unexpected-end-parse-error/ Share on other sites More sharing options...
shoz Posted February 26, 2007 Share Posted February 26, 2007 Look for an unclosed "{". Post the entire script If you can't find it. Link to comment https://forums.phpfreaks.com/topic/40244-solved-unexpected-end-parse-error/#findComment-194711 Share on other sites More sharing options...
Scriptor Posted February 26, 2007 Share Posted February 26, 2007 This might be one of the toughest bugs to crack. One suggestion is to use an editor with syntax highlighting that highlights matching braces when your cursor is next to one. See if all the braces match up as they're supposed to. Link to comment https://forums.phpfreaks.com/topic/40244-solved-unexpected-end-parse-error/#findComment-194715 Share on other sites More sharing options...
dsaba Posted February 26, 2007 Author Share Posted February 26, 2007 i found the missing brackets, i learn more everyday now I know what this error msg means thank u Link to comment https://forums.phpfreaks.com/topic/40244-solved-unexpected-end-parse-error/#findComment-194730 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.