I checked all of my code in sell.php and when I try to run it I get the syntax error of unexpected 'if' in /home/...../sell.php. Can anybody try to find my mistake. Part of my code is below.
if ($stock === false)
{
apologize("Entered stock symbol was invalid.");
}
else
{
$rows = query("SELECT shares FROM shares WHERE user_id = ? and symbol = ?", $_SESSION["id"], strtoupper($_POST["code"]))
if (count($rows) == 1)
{
$shares = $rows[0]["shares"];
}
else
{
apologize("Shares for specified symbol not found.");
}