dsaba Posted February 26, 2007 Share Posted February 26, 2007 i get this parse error Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /home/www/p2mhunt.awardspace.com/en_videoforminsert.php on line 89 this is line 89 $transspecifictype_es = "spanish for anime"; what does that error code mean? i dont find anythign wrong with line 89 Quote Link to comment https://forums.phpfreaks.com/topic/40234-parse-error-dont-see-the-problem/ Share on other sites More sharing options...
Orio Posted February 26, 2007 Share Posted February 26, 2007 Can you post the full code? Orio. Quote Link to comment https://forums.phpfreaks.com/topic/40234-parse-error-dont-see-the-problem/#findComment-194661 Share on other sites More sharing options...
kenrbnsn Posted February 26, 2007 Share Posted February 26, 2007 Sometime these errors don't point to the line where the error occurs, but to the line where PHP gives up trying to figure out what you meant. Look for either a missing semi-colon or an unclosed quoted string on the lines preceding that line. Ken Quote Link to comment https://forums.phpfreaks.com/topic/40234-parse-error-dont-see-the-problem/#findComment-194662 Share on other sites More sharing options...
dsaba Posted February 26, 2007 Author Share Posted February 26, 2007 these are some lines before line 89 and after line 89 switch ($s4transvideogeneraltype) { case "Video" : $transgeneraltype_en = "Videos"; $transgeneraltype_he = "Sratim"; $transgeneraltype_es = "Peliculas"; $transgeneraltype_pt = "pt word for video"; $transgeneraltype_pl = "pl word for video"; break; default : echo "unable to determine and translate filegeneraltype"; break; } switch ($4transvideospecifictype) { case "Anime" : $transspecifictype_en = "Anime"; $transspecifictype_he = "hebrew for anime"; $transspecifictype_es = "spanish for anime"; $transspecifictype_pt = "pt for anime"; $transspecifictype_pl = "polish for anime"; break; case "Divx Movie" : $transspecifictype_en = "Divx Movie"; $transspecifictype_he = "he for divx movie"; $transspecifictype_es = "es for divx movie"; $transspecifictype_pt = "pt for divx movie"; $transspecifictype_pl = "pl for divx movie"; break; case "PSP Movie" : $transspecifictype_en = "PSP Movie"; $transspecifictype_he = "he for psp movie"; $transspecifictype_es = "es for psp movie"; $transspecifictype_pt = "pt for psp movie"; $transspecifictype_pl = "pl for polish movie"; break; case "Ipod Movie" : $transspecifictype_en = "Ipod Movie"; $transspecifictype_he = "hebrew translation"; $transspecifictype_es = "spanish translation"; $transspecifictype_pt = "pt translation"; $transspecifictype_pl = "polish translation"; break; case "Full DVD" : $transspecifictype_en = "Full DVD"; $transspecifictype_he = "hebrew translation"; $transspecifictype_es = "spanish translation"; $transspecifictype_pt = "pt translation"; $transspecifictype_pl = "polish translation"; break; case "Other Video" : $transspecifictype_en = "Other Video"; $transspecifictype_he = "hebrew translation"; $transspecifictype_es = "spanish translation"; $transspecifictype_pt = "pt translation"; $transspecifictype_pl = "polish translation"; break; default : echo "unable to translate filespecifictype"; break; } Quote Link to comment https://forums.phpfreaks.com/topic/40234-parse-error-dont-see-the-problem/#findComment-194663 Share on other sites More sharing options...
dsaba Posted February 26, 2007 Author Share Posted February 26, 2007 i figured it out, thanks Quote Link to comment https://forums.phpfreaks.com/topic/40234-parse-error-dont-see-the-problem/#findComment-194665 Share on other sites More sharing options...
Orio Posted February 26, 2007 Share Posted February 26, 2007 The variable name $4transvideospecifictype is illegal. I think you miss-placed that 4. From the manual: Variable names follow the same rules as other labels in PHP. A valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. Orio. Quote Link to comment https://forums.phpfreaks.com/topic/40234-parse-error-dont-see-the-problem/#findComment-194667 Share on other sites More sharing options...
redarrow Posted February 26, 2007 Share Posted February 26, 2007 switch ($4transvideospecifictype) to switch ($transvideospecifictype) your not allowed to use numbers at the begining of varables ok. Quote Link to comment https://forums.phpfreaks.com/topic/40234-parse-error-dont-see-the-problem/#findComment-194670 Share on other sites More sharing options...
dsaba Posted February 26, 2007 Author Share Posted February 26, 2007 i'm stumped over this one, i looked up whitespace error didn't seem to find anythign useful in identifying the problem Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/www/p2mhunt.awardspace.com/en_videoforminsert.php on line 293 //make userlink and filelink links, put them into db as userlink and filelink $result = mysql_query("SELECT userid FROM userinfo WHERE username='$svideosubmitter'"); $row = mysql_fetch_assoc($result); $fetcheduserid = "$row['userid']"; $userlink = <<<EOT <a href="/userinfo.php?id=$fetcheduserid" target="_self">$videosubmitter</a> EOT; $query5 = "UPDATE `userinfo` SET `userlink`='$userlink', WHERE `userid`='$fetcheduserid'"; //other query for filelink $result = mysql_query("SELECT fileid FROM mainfilelist WHERE filename='$svideoname'"); $row = mysql_fetch_assoc($result); $fetchedfileid = "$row['fileid']"; $filelink = <<<EOT <a href="/video.php?id=$fetchedfileid" target="_self">$videoname</a> EOT; $query6 = "UPDATE `mainfilelist` SET `filelink`='$filelink', WHERE `fileid`='$fetchedfileid'"; line 293 is where it says "//other query for filelink" Quote Link to comment https://forums.phpfreaks.com/topic/40234-parse-error-dont-see-the-problem/#findComment-194685 Share on other sites More sharing options...
redarrow Posted February 26, 2007 Share Posted February 26, 2007 <?php $fetcheduserid = " '".$row['userid']."' "; ?> Quote Link to comment https://forums.phpfreaks.com/topic/40234-parse-error-dont-see-the-problem/#findComment-194691 Share on other sites More sharing options...
itsmeArry Posted February 28, 2007 Share Posted February 28, 2007 and also remove the " ` " in the query $query5 = "UPDATE `userinfo` SET `userlink`='$userlink', WHERE `userid`='$fetcheduserid'"; to $query5 = "UPDATE userinfo SET userlink='$userlink', WHERE userid='$fetcheduserid'"; in this query also $query6 = "UPDATE `mainfilelist` SET `filelink`='$filelink', WHERE `fileid`='$fetchedfileid'"; to $query6 = "UPDATE mainfilelist SET filelink='$filelink', WHERE fileid='$fetchedfileid'"; Quote Link to comment https://forums.phpfreaks.com/topic/40234-parse-error-dont-see-the-problem/#findComment-195891 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.