Jump to content
MakeWebGames

Recommended Posts

Posted

I Suddenly Got This And Im Not Sure Why :?

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/cursed/public_html/itembuy.php on line 40

 

Heres Line 30-45

if($itemd['itmbuyable'] == 0)
{
print "This item can't be bought!";
$h->endpage();
exit;
}
$price=($itemd['itmbuyprice']*$_POST['qty']);
item_add($userid, $_GET['ID'], $_POST['qty']);
$db->query("UPDATE users SET money=money-$price WHERE userid=$userid");
$db->query("INSERT INTO itembuylogs VALUES ('', $userid, {$_GET['ID']}, $price, {$_POST['qty']}, unix_timestamp(), '{$ir['username']} bought {$_POST['qty']} {$itemd['itmname']}(s) for {$price}')");
$s = ($_POST['qty'] == 1) "" : "s";
echo sprintf("You bought %s %s%s for \$%s", number_format($_POST['qty']), stripslashes($itemd['itmname']), $s, number_format($price));
}
}
$h->endpage();
?>

 

Thanks In Advanced :-)

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.   Paste as plain text instead

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