To true.Originally Posted by Tomdarkness2
To true.Originally Posted by Tomdarkness2
Its better because it dosent keep showing the alert to the vister everytime the alert.php refreshes lol
Try editing the sql by hand and test if it the alert works
Edit: I think this is the first time I have double posted. I think "_"
Sorry
Nope, and I don't know where I edit it anyway :p
And I changed localhost to freemysql.net on the settings if thats anything to do with it.
OK I have it sorta up. It says an error at http://www.habbolido.co.uk/staffarea/alert.php the line in question is
Echo"$_COOKIE[$alertData[ID]]"
>PHP Code:Echo"$_COOKIE[$alertData[ID]]"
Also you shouldnt really have to change localhostPHP Code:echo "$_COOKIE[$alertData[ID]]";
Sorry I can't add rep LuckyRare
Anyways, this is really annoying me now, it says an error, view it at http://www.habbolido.co.uk/staffarea/alert.php
is the code :@PHP Code:<?
$dbName = "********";
$dbUser = "********";
$dbPass = "********";
// Connect
mysql_connect ("localhost", "$dbUser", "$dbPass");
mysql_select_db ("$dbName");
// Get Alert
$alertQuery = mysql_query("SELECT * FROM alert WHERE active='Y'");
if(@mysql_num_rows($alertQuery) =="1"){
$alertData = @mysql_fetch_array($alertQuery);
if($_COOKIE[$alertData[ID]] !="Y"){
$y = "Y";
setcookie($alertData[ID], $y);
Echo"
<script language='javascript'>alert('$alertData[message]');</script>";
}
}
Echo"<META HTTP-EQUIV='refresh' content='60;URL=alert.php'>";
echo "$_COOKIE[$alertData[ID]]";
?>
Edit: In the original code it saidbut that couldn't possibly work as all the code is set toPHP Code:$_COOKIE[$alertDataID]
PHP Code:[$alertData[ID]]
BTW SQL is configured correcty.
Heh, you shall remember teh moment.Originally Posted by Luckyrare
I think this is the first time I have double posted. I think. Sorry.
Newsie
Dude it works fine for me. You really shouldent need to change localhost. Also you need to make sure PHP Safe Mode is turned off I think. Plus why are you trying to echo the ID :s
Want to hide these adverts? Register an account for free!