Page 4 of 4 FirstFirst 1234
Results 31 to 39 of 39

Thread: Alerts

  1. #31
    Join Date
    Mar 2005
    Location
    Leeds
    Posts
    3,423
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Tomdarkness2
    Its better because it dosent keep showing the alert to the vister everytime the alert.php refreshes lol
    To true.

  2. #32
    Join Date
    Mar 2005
    Location
    Leeds
    Posts
    3,423
    Tokens
    0

    Latest Awards:

    Default

    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

  3. #33
    Join Date
    Dec 2004
    Location
    Manchester, UK
    Posts
    334
    Tokens
    0

    Default

    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.

  4. #34
    Join Date
    Dec 2004
    Location
    Manchester, UK
    Posts
    334
    Tokens
    0

    Default

    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]]"

  5. #35
    Join Date
    Mar 2005
    Location
    Leeds
    Posts
    3,423
    Tokens
    0

    Latest Awards:

    Default

    PHP Code:
    Echo"$_COOKIE[$alertData[ID]]" 
    >

    PHP Code:
    echo "$_COOKIE[$alertData[ID]]"
    Also you shouldnt really have to change localhost

  6. #36
    Join Date
    Dec 2004
    Location
    Manchester, UK
    Posts
    334
    Tokens
    0

    Default

    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

    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]]";
    ?>
    is the code :@

    Edit: In the original code it said
    PHP Code:
    $_COOKIE[$alertDataID
    but that couldn't possibly work as all the code is set to
    PHP Code:
    [$alertData[ID]] 

  7. #37
    Join Date
    Dec 2004
    Location
    Manchester, UK
    Posts
    334
    Tokens
    0

    Default

    BTW SQL is configured correcty.

  8. #38
    Join Date
    Oct 2005
    Location
    Teh NORTH Pole! ;O
    Posts
    99
    Tokens
    0

    Default

    Quote Originally Posted by Luckyrare
    I think this is the first time I have double posted. I think. Sorry.
    Heh, you shall remember teh moment.

    Newsie

  9. #39
    Join Date
    Jun 2005
    Posts
    4,795
    Tokens
    0

    Latest Awards:

    Default

    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

Page 4 of 4 FirstFirst 1234

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •