Firstly replace
PHP Code:
sql_query("INSERT INTO shoutbox (id, userid, username, date, text) VALUES ('id'," . sqlesc($userid) . ", " . sqlesc($username) . ", $date, " . sqlesc($text) . ")") or sqlerr(__FILE__, __LINE__);
print "<script type="text/javascript">parent.document.shbox.shbox_text.value ='';</script>";
}
With;:
PHP Code:
sql_query("INSERT INTO shoutbox (id, userid, username, date, text) VALUES (".$id."," . sqlesc($userid) . ", " . sqlesc($username) . ", $date, " . sqlesc($text) . ")") or sqlerr(__FILE__, __LINE__);
print "<script type="text/javascript">parent.document.shbox.shbox_text.value ='';</script>";
}
Next step:
Replace:
PHP Code:
$arr2 = mysql_fetch_assoc($res2);
$resowner = sql_query("SELECT id, username, class FROM users WHERE id=$arr[userid]") or print(mysql_error());
$rowowner = mysql_fetch_array($resowner);
if ($rowowner["class"] == "8")
With::
PHP Code:
$arr2 = mysql_fetch_assoc($res2);
$resowner = sql_query("SELECT id, username, class FROM users WHERE id=$arr2[userid]") or print(mysql_error());
$rowowner = mysql_fetch_array($resowner);
if ($rowowner["class"] == "8")
Try That G8 work dude