Page 1 of 1

Parse Error: Unexpected $

Posted: Tue Mar 21, 2006 8:39 pm
by Citizen
Parse error: parse error, unexpected $ in /home/xx/public_html/rPicker.php on line 12
I get that from running this code:

Code: Select all

<?php

if ($_SESSION['loggedin']) {

$dbh=mysql_connect ("localhost", "xx", "xx") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("xx");

$sql="SELECT * FROM `accounts` WHERE points > 1 ORDER BY RAND() LIMIT 1";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$selaccount = $row["account_id"];
?>
I'm not seeing anything wrong... any ideas?

Posted: Tue Mar 21, 2006 8:40 pm
by feyd
match up your brace pairs

Posted: Tue Mar 21, 2006 8:43 pm
by Citizen
Thanks! Sorry for the stupid mistake. :(