Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 10 of 10
  1. #1
    Join Date
    Apr 2006
    Location
    Salford
    Posts
    2,108
    Tokens
    0

    Latest Awards:

    Default Help [PHP] [mySQL]

    Basicly i want it so when a certain userlevel refresh's the page a certain iFrame does a sql query.

    I dont know how to do the refreshing bit though.

    Here's my php i made for a certain level.

    PHP Code:
    <?php if($fetch->userlevel == "4" || $fetch->userlevel == "4"){
    echo
    "I want it here!";} ?>
    And the SQL query..

    PHP Code:
    mysql_query("UPDATE users SET health='999' WHERE username='$username'"); 
    Thanks.

  2. #2
    Join Date
    Jan 2007
    Posts
    651
    Tokens
    0

    Default

    Maybe you could put the function in the iframe, then call it from a different page.Correct me if im wrong, i think thats what you need.
    James


    Connected to reality through a proxy server.

  3. #3
    Join Date
    Apr 2006
    Location
    Salford
    Posts
    2,108
    Tokens
    0

    Latest Awards:

    Default

    Hmm im confused.

    The frame i want it in is mini.php.

  4. #4
    Join Date
    Jan 2007
    Posts
    651
    Tokens
    0

    Default

    So you want to update one iFrame when you refresh a different one.
    James


    Connected to reality through a proxy server.

  5. #5
    Join Date
    Apr 2006
    Location
    Salford
    Posts
    2,108
    Tokens
    0

    Latest Awards:

    Default

    Nope, when you refresh the page the whole of the iframe's refresh, thats what i want.

    So basicly when mini.php is refreshed.

  6. #6
    Join Date
    Jan 2007
    Posts
    651
    Tokens
    0

    Default

    Ah i see, you would have to refresh the page that holds all the iFrames.
    James


    Connected to reality through a proxy server.

  7. #7
    Join Date
    May 2007
    Location
    Nebo, NC, USA
    Posts
    2,517
    Tokens
    0

    Latest Awards:

    Default

    PHP Code:
    <?php 
    if($fetch->userlevel == "4" || $fetch->userlevel == "4"){
    echo
    "I want it here!";

    ?>
    why are you doing:
    if userlevel = 4 OR if userlevel = 4 two times?
    Also why do it in an IFRAME, I don't think I am getting what you want to do?

  8. #8
    Join Date
    Jul 2007
    Location
    Swindon
    Posts
    990
    Tokens
    125

    Default

    think it was an example? the two fours.

  9. #9
    Join Date
    Apr 2006
    Location
    Salford
    Posts
    2,108
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Dentafrice, View Post
    PHP Code:
    <?php 
    if($fetch->userlevel == "4" || $fetch->userlevel == "4"){
    echo
    "I want it here!";

    ?>
    why are you doing:
    if userlevel = 4 OR if userlevel = 4 two times?
    Also why do it in an IFRAME, I don't think I am getting what you want to do?
    I ment to put

    PHP Code:
     <?php 
    if($fetch->userlevel == "4" || $fetch->userlevel == "4"){
    echo
    "I want it here!";

    ?>

    I just want it so when this frame is reloaded it does the query above if that make's sence?

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

    Latest Awards:

    Default

    I fail to see the purpose of having a iframe that refreshes periodically, bogging down the server with useless web requests. Since nothing can happen until someone makes a request somewhere then why not make the check you want to make happen when a page is requested?

Posting Permissions

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