HabboxWiki needs you!
Are you a Habbo buff? Or maybe a rare trader with a bunch of LTDs? Get involved with HabboxWiki to share your knowledge!
Join our team!
Whether you're raving for rares, excited for events or happy helping, there's something for you! Click here to apply
Need a helping hand?
Check out our guides for all things to help you make friends, make rooms, and make money!


Page 1 of 4 1234 LastLast
Results 1 to 10 of 38

Thread: PHP help.

  1. #1
    Join Date
    Apr 2008
    Location
    England.
    Posts
    1,324
    Tokens
    0

    Latest Awards:

    Default PHP help.

    Hey, I've just finished a little script I was creating. I submitted an entry to a database and on another file I displayed the contents of the database. I created a little file that deletes all entries from the database and it worked.. but now when I submit another entry to the database it doesn't display anything when I go to fetch the contents, just a white page.

    This is the code I am using.
    PHP Code:
    <?php
    include 'database.php';
    $fetch mysql_query("SELECT * FROM database");
    while (
    $display mysql_fetch_array($fetch)) {
    echo 
    "
    Blah: 
    $display[blah]
    "
    ;
    }
    ?>
    Obviously I've taked out the function names and such but does anybody know why it's not displaying anything? (It used to work before I deleted the entries)

  2. #2
    Join Date
    Jul 2008
    Location
    Hastings, UK.
    Posts
    2,050
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Excellent View Post
    Hey, I've just finished a little script I was creating. I submitted an entry to a database and on another file I displayed the contents of the database. I created a little file that deletes all entries from the database and it worked.. but now when I submit another entry to the database it doesn't display anything when I go to fetch the contents, just a white page.

    This is the code I am using.
    PHP Code:
    <?php
    include 'database.php';
    $fetch mysql_query("SELECT * FROM database");
    while (
    $display mysql_fetch_array($fetch)) {
    echo 
    "
    Blah: 
    $display[blah]
    "
    ;
    }
    ?>
    Obviously I've taked out the function names and such but does anybody know why it's not displaying anything? (It used to work before I deleted the entries)
    PHP Code:
    <?php
    include "database.php"// Hate single quotes. :P
    $result mysql_query("SELECT * FROM `database`"); // prefer result.
    while($row mysql_fetch_array($result)) { 
    echo 
    "bla: "$row[""] ."";
    }
    ?>
    [/php]

  3. #3
    Join Date
    Apr 2008
    Location
    England.
    Posts
    1,324
    Tokens
    0

    Latest Awards:

    Default

    Thanks but it still isn't displaying anything. Nothing can be wrong with my submit code due to it working before I deleted all entries.

  4. #4
    Join Date
    Jul 2008
    Location
    Hastings, UK.
    Posts
    2,050
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Excellent View Post
    Thanks but it still isn't displaying anything. Nothing can be wrong with my submit code due to it working before I deleted all entries.
    Doubt it, paste all code but remove passwords etc.

  5. #5
    Join Date
    Apr 2005
    Posts
    4,614
    Tokens
    90

    Latest Awards:

    Default

    Are you 100% sure there is data in the table?

  6. #6
    Join Date
    Apr 2008
    Location
    England.
    Posts
    1,324
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Robbie! View Post
    Are you 100% sure there is data in the table?
    Is there anyway I could check in PMA?

  7. #7
    Join Date
    Apr 2008
    Location
    England.
    Posts
    1,324
    Tokens
    0

    Latest Awards:

    Default

    *bump* still need help

  8. #8
    Join Date
    Feb 2006
    Location
    Scotland
    Posts
    2,087
    Tokens
    138

    Latest Awards:

    Default

    To check for data in phpMyAdmin select the database, then the table and then click browse?

    If there is data there then its not outputting correctly, if not then its not submitting it correctly.

  9. #9
    Join Date
    Apr 2008
    Location
    England.
    Posts
    1,324
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Johno! View Post
    To check for data in phpMyAdmin select the database, then the table and then click browse?

    If there is data there then its not outputting correctly, if not then its not submitting it correctly.
    Just displays all my rows.

  10. #10
    Join Date
    Nov 2006
    Location
    Liverpool/Manchester
    Posts
    2,457
    Tokens
    0

    Latest Awards:

    Default

    when you see the rows, click browse should then show data (if any)
    Joe


Page 1 of 4 1234 LastLast

Posting Permissions

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