View Single Post
  #3  
Old 27th December 2022, 20:02
Floky123 Floky123 is offline
Senior Member
 
Join Date: Nov 2013
Slovenia
Posts: 55
Default
Quote:
Originally Posted by BamBam0077 View Post
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
Thank you for time and help, but that don't work :(
Reply With Quote