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 6 of 6

Thread: [PHP] Help

  1. #1
    Join Date
    Jun 2007
    Location
    England
    Posts
    495
    Tokens
    0

    Default [PHP] Help

    Hey,

    I need some help with 2 things, the first thing is...

    1. How to make a php search so it will bring up every product relating to what the user put into the box... it will echo it, so say the user put in PC.. it would show all the products with PC in the title

    The second thing is...

    2. Say I had alot of products in a row... well how do i make it so when it like echos 10 it will put a link at the bottom so it will go to like page 2 and echo the rest and so on so it will look like...

    < Page 1, 2,3,4,5,.....>

    PHP code would help aswell as some guidance

    Danny


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

    Latest Awards:

    Default

    1:
    use eregi =]

    eg
    PHP Code:
    <?php
    $g_sql 
    mysql_query("select * from relating");
    while(
    $l mysql_fetch_array($g_sql))
    {
    if(
    eregi($searchfor,$l[description]))
    echo(
    "$l[name]<br />");
    }
    ?>
    Something like that

    And for second, use the limit function in the mysql_query
    Coming and going...
    Highers are getting the better of me

  3. #3
    Join Date
    Jun 2007
    Location
    England
    Posts
    495
    Tokens
    0

    Default

    thanks for your reply but can anyone explain the 2nd one abit more?
    thanks


  4. #4
    Join Date
    Sep 2006
    Location
    Evanston, Illinois.
    Posts
    2,361
    Tokens
    0

    Latest Awards:

    Default

    Arrays.... or use zoom search =)
    How could this hapen to meeeeeeeeeeeeeee?lol.

  5. #5
    Join Date
    Jan 2008
    Posts
    287
    Tokens
    0

    Default

    Quote Originally Posted by Reconix View Post
    Arrays.... or use zoom search =)
    What the hell are you talking about?



    -----

    @Thread starter, Google: PHP + MySQL pagination.

    It just has to do with the LIMIT and WHERE

  6. #6
    Join Date
    Jun 2007
    Location
    England
    Posts
    495
    Tokens
    0

    Default

    Can anyone help with the 2nd bit?

    Dan


Posting Permissions

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