if( $action == 'buy_item' )
{
print"You have ";
$gold = @ $db = mysql_pconnect("localhost", "", "");
if (!$db)
{
echo "<b>Could not connect to database, try again later.</b>";
exit;
}
mysql_select_db("forums");;
$result = mysql_query("select * from phpbb_users WHERE user_id='$user_id'");
$numrows = mysql_num_rows($result);
if ($numrows > 0)
{
$row = mysql_fetch_object($result);;
print"$row->user_points ";
};
print"gold<br>";
$id = $_GET['id'];
print"Buy page! ";
print"$cost";
print"$gold";
print"$row->user_points ";
if ($row->user_points < $cost)
{
print"<br>You do not have enough gold to buy this item. This item costs $cost gold.";
}
if ($row->user_points > $cost)
{
print"<br>You now own $name";
exit;
}
Where do I have a * up if statement? (not properly closed i mean, i cant find it, its giveing the the error like i have one)
*[mod-edit] Dont use bad words [/mod-edit]