Closed, thanks chris & oliver
Printable View
Closed, thanks chris & oliver
MySQL Query is done as mysql_query('TRUNCATE TABLE chat'); I presume the error comes because of missing ().
tried that ;)
---------- Post added at 01:32 PM ---------- Previous post was at 01:32 PM ----------
When I attempt that it does Parse error: syntax error, unexpected $end in C:\xampp\htdocs\fansite\clearchat.php on line 21
Yes, because this;
has no end. You open the { and never close it.Code:if(userRow($id,'habbo_name') && userRow($id,'habbo_hotel')){
Oh god your a life saver thanks!
---------- Post added at 01:40 PM ---------- Previous post was at 01:38 PM ----------
Oh wait, Nvm it does close ;)
Parse error: syntax error, unexpected $end in C:\xampp\htdocs\fansite\clearchat.php on line 21
It doesn't close... unless you didn't post all the code. Here, I fix.
There.PHP Code:<?php
error_reporting(0);
ob_start();
include "mysql_connect.php";
include "config.php";
include "functions.php";
$sql = mysql_query("TRUNCATE TABLE chat");
if(userRow($id,'habbo_name') && userRow($id,'habbo_hotel')){
if($in["rank"] == 'Administrator'){
echo $sql;
}
}
?>
</br>
<A HREF="chat.php">GO BACK</A>
I had already figured that out after i realized. Thanks though.
Fixed the only errors I could see.
PHP Code:<?php
error_reporting(0);
?>
<?php
ob_start();
include "mysql_connect.php";
include "config.php";
include "functions.php";
?>
<?php
$sql = "TRUNCATE TABLE chat";
if(userRow($id,'habbo_name') && userRow($id,'habbo_hotel')){
if($in["rank"] == 'Administrator'){
mysql_query($sql);
}
}
?>
</br>
<A HREF="chat.php">GO BACK</A>