Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/40234-parse-error-dont-see-the-problem/
Share on other sites

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

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;
}

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.

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"

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'";

 

 

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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