Forum Moderators: coopster
[07-Dec-2011 08:33:13] PHP Parse error: syntax error, unexpected T_STRING in C:\inetpub\wwwroot\insertfurni.php on line 24
<?php
require_once "/global.php";
$q = mysql_query("SELECT * FROM users WHERE username = '" . USER_NAME . "'") or DIE (mysql_error());
while($row = mysql_fetch_array($q)) {
$belcredits = $row["belcredits"];
$userid = $row["id"];
}
$q2 = mysql_query("SELECT * FROM items ORDER BY id DESC LIMIT 1") or DIE (mysql_error());
while($row2 = mysql_fetch_array($q2)) {
$fid = $row2["id"] + 15;
}
if ($belcredits <= 49)
{
echo "Je hebt niet genoeg belcredits.";
}
else
{
mysql_query("INSERT INTO items (id, user_id, base_item, extra_data, wall_pos) VALUES ('$fid','$userid', '202', '', '')")
mysql_query("UPDATE users SET belcredits = belcredits - 50 WHERE username = '".USER_NAME."'");
echo "Je hebt de meubel ontvangen ! - Wacht 5 seconden we brengen je terug naar de site";
or DIE (mysql_error());
}
?>
echo "Je hebt de meubel ontvangen ! - Wacht 5 seconden we brengen je terug naar de site";
or DIE (mysql_error());
<?php
require_once "/global.php";
$q = mysql_query("SELECT * FROM users WHERE username = '" . USER_NAME . "'") or DIE (mysql_error());
while($row = mysql_fetch_array($q)) {
$belcredits = $row["belcredits"];
$userid = $row["id"];
}
$q2 = mysql_query("SELECT * FROM items ORDER BY id DESC LIMIT 1") or DIE (mysql_error());
while($row2 = mysql_fetch_array($q2)) {
$fid = $row2["id"] + 15;
}
if ($belcredits <= 49){
echo "Je hebt niet genoeg belcredits.";
}else{
mysql_query("INSERT INTO items (id, user_id, base_item, extra_data, wall_pos) VALUES ('$fid','$userid', '202', '', '')") or die(mysql_error());
mysql_query("UPDATE users SET belcredits = belcredits - 50 WHERE username = \"".USER_NAME."\"") or die(mysql_error());
echo "Je hebt de meubel ontvangen ! - Wacht 5 seconden we brengen je terug naar de site";
}
?>
mysql_query("INSERT INTO items (id, user_id, base_item, extra_data, wall_pos) VALUES ('$fid','$userid', '202', '', '')")