DiscoTrio Posted December 13, 2009 Share Posted December 13, 2009 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>"; } ?> Quote Link to comment Share on other sites More sharing options...
Alex Posted December 13, 2009 Share Posted December 13, 2009 You forgot $row[...] $ttname = $row['tname']; $ttpreview = $row['preview']; $ttprice = $row['price']; Quote Link to comment Share on other sites More sharing options...
DiscoTrio Posted December 13, 2009 Author Share Posted December 13, 2009 ooooooooooooooooooooooo Quote Link to comment 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.