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 9 of 9
  1. #1
    Join Date
    Apr 2006
    Location
    Salford
    Posts
    2,108
    Tokens
    0

    Latest Awards:

    Default Php help [QUICK]

    Basicly, i have made this up to know but it wont seem to work,

    What i want it to do is, you type in the username and it completes the fields;

    Here is my code,

    Anybody get me lol?

    Instead of fetching the username's i type, it just fetch's mine.

    PHP Code:
    <td align="center" valign="top"><div align="center">



          <table width="100%" height="94" border="1" cellpadding="0" cellspacing="0" class="thinline">



              <tr>



                <td height="21" colspan="4" background="skins/<?php echo"$fetch->skin"?>/grad.jpg"><div align="center">

                    Ip Check</div></td>



              </tr>



              <tr>



                <td width="184" height="21" align="center">Username</td>



                <td width="137" align="center">Ip</td>



                <td width="149" align="center">Registered Ip</td>



                <td width="105" align="center">Status</td>



              </tr>



           



           



      <?php



        



     
    if ($_POST['search1']){



     
    $username11 $_POST['$username11']; 



    $fetchy=mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$username11'"));



      
    $query=mysql_query("SELECT * FROM users WHERE l_ip='$fetch->l_ip' AND status='Alive'");



      while(
    $fetch mysql_fetch_object($query)){



      if(
    $username11->status == "Dead"){



      
    $username11="ModRevive";



      }elseif(
    $fetch->username11->status == "Alive"){



      
    $username11="ModKill";



      }



       echo 
    " <tr><td width=\"184\" height=\"21\"><div align=\"center\">$fetch->username11(<a onclick=$fetch($fetch->username11); href=#>$fetch!</a>)</div></td>



                <td width=\"137\"><div align=\"center\">
    $fetch->l_ip</div></td>



                <td width=\"149\"><div align=\"center\">
    $fetch->r_ip</div></td>



                <td width=\"105\"><div align=\"center\">
    $fetch->status</div></td></tr>";   }



                }



      



      



     if (
    $_POST['search2']){



     
    $tl_ip $_POST['tl_ip']; 



    $fetchy=mysql_fetch_object(mysql_query("SELECT * FROM users WHERE l_ip='$tl_ip'"));



      
    $query=mysql_query("SELECT * FROM users WHERE l_ip='$fetch->l_ip' AND status='Alive'");



      while(
    $fetch mysql_fetch_object($query)){



      if(
    $search2->status == "Dead"){



      
    $search2="ModRevive";



      }elseif(
    $fetch->search2 == "Alive"){



      
    $search2="ModKill";



      }



       echo 
    " <tr><td width=\"184\" height=\"21\"><div align=\"center\">$tl_ip->username(<a onclick=$fetch($fetch->username); href=#>$fetch!</a>)</div></td>



                <td width=\"137\"><div align=\"center\">
    $fetch->l_ip</div></td>



                <td width=\"149\"><div align=\"center\">
    $fetch->r_ip</div></td>



                <td width=\"105\"><div align=\"center\">
    $fetch->status</div></td></tr>";   }



                }



      
    ?>



            <tr>



              <td height="21" colspan="4">



                <div align="center">Username:



                  <input type="text" name="username11" id="username11" />



                    <input type="submit" name="search1" id="search1" value="Search Username" />



                    <br />



                      Ip:



                  <input type="text" name="tl_ip" id="tl_ip" />



                      <input type="submit" name="search2" id="search2" value="Search Ip" />



                </div></td>



            </tr>



          </table>



                  



        </div>

  2. #2
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    wouldnt u need to use some sort of javascript to make the content load without refreshing page?
    Coming and going...
    Highers are getting the better of me

  3. #3
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    That is oh-so insecure.

    Fix the security issues and I'll help ^_^

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

    Latest Awards:

    Default

    Quote Originally Posted by Invent View Post
    That is oh-so insecure.

    Fix the security issues and I'll help ^_^
    What do you mean?

    And this is only part of the script.

  5. #5
    k Guest

    Default

    kayne pm me your msn

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

    Latest Awards:

    Default

    Quote Originally Posted by k View Post
    kayne pm me your msn
    *Kane

    And why?

  7. #7
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    What do you mean?

    And this is only part of the script.
    And its a very insecure part of the script..

    Remember to clean your variables and behind your ears
    Coming and going...
    Highers are getting the better of me

  8. #8
    Join Date
    Apr 2006
    Location
    Australia
    Posts
    307
    Tokens
    0

    Default

    Not quite sure of the code, but you'd need to use AJAX.

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

    Latest Awards:

    Default

    Ewww $fetch->blab->befaoij gross. Are you using a premade script?

    Probably because you have defined $username11 about 50 times :\

    $username11="ModRevive";

Posting Permissions

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