Jump to content

Where is this parse error?


DiscoTrio

Recommended Posts

I cant find where im getting my parse error, all I get is:

 

Parse error: syntax error, unexpected '[' in /home/bmvybfbk/public_html/templateowned.php on line 14

 

 

 

<?
$con = mysql_connect("localhost","********","*********");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("bmvybfbk_website", $con);
$result = mysql_query("SELECT * FROM items2 WHERE username = '$session->username' ORDER BY id");
while($row = mysql_fetch_array($result)){
$ttnumber = $row['name'];
$result2 = mysql_query("SELECT * FROM templatesearch WHERE id = '$ttnumber'");
while($row = mysql_fetch_array($result2)){
$ttname = ['tname'];
$ttpreview = ['preview'];
$ttprice = ['price'];
}
echo $ttname . "<br>" . $ttpreview . "<br>" . "Costs: " . $ttprice . " points. ";
echo "<a href='templateowned.php?use=$ttnumber'><font face='Papyrus' size='3'> Use</font></a>";
}
?>

Link to comment
https://forums.phpfreaks.com/topic/185003-where-is-this-parse-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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