Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16
  1. #11
    Join Date
    Oct 2011
    Location
    Melbourne
    Posts
    637
    Tokens
    1,376

    Default

    Okay, I'm guessing you are new to PHP? Every time you open a loop/if condition with the curly brackets { you need to close it when it has finished with the } bracket. The error code tells you what it is expecting.

    Not going to fully help out now because I'm not in the mood to do coding work..

    ---------- Post added 06-04-2012 at 05:01 PM ----------

    Also, you need to put the code I showed you above inside your content DIV. make an if statement to see whether the username is set at all and if it ISN'T then show the userlist. What you currently have would look like this:

    Blinger
    21 male australia
    [email protected]
    mysace whatever

    ------
    (c) Blinger 2012 doin' his ****, my footer here.

    <img of end of site>

    BLINGER
    2nd User
    3rd user
    Wixi
    Tiegan

  2. #12

    Default

    Yeah i fixed the error code about the end, But then it showed the format as what you're saying but it's setup not to show the profile unless you request it by going. ?user=chris

    So I've got the profile side setup good, But the main part where i am having issues is the Member List witch is showing up like:

    {MemberName}
    {MemberName}
    {MemberName}

    I inserted the code you gave me and it is still displaying like that.

    *sent you a pm btw*
    Thank-you,
    Christopher Holland

  3. #13
    Join Date
    Jun 2005
    Location
    /dev/null
    Posts
    4,918
    Tokens
    126

    Latest Awards:

    Default

    My previous code didn't work because there's a typo in it . I'm used to C++ at the moment and missed a $ symbol.

    PHP Code:
    }
    }else{
    //gets all the members from the database
    $getusers mysql_query("SELECT * FROM `authme` ORDER BY `id` ASC") or die(mysql_error());
    //loops there name out
    $i 1;
    while (
    $user mysql_fetch_array($getusers)) {
    if (
    $i != 0) {
    echo 
    "<a href=\"members.php?user={$user['username']}\">{$user['username']}</a> ";
    } else {
    echo 
    "<a href=\"members.php?user={$user['username']}\">{$user['username']}</a><br />";
    }
    $i++;
    }
    }
    echo 
    "<center>";
    ?> 

  4. #14

    Default

    Quote Originally Posted by N!ck View Post
    My previous code didn't work because there's a typo in it . I'm used to C++ at the moment and missed a $ symbol.

    PHP Code:
    }
    }else{
    //gets all the members from the database
    $getusers mysql_query("SELECT * FROM `authme` ORDER BY `id` ASC") or die(mysql_error());
    //loops there name out
    $i 1;
    while (
    $user mysql_fetch_array($getusers)) {
    if (
    $i != 0) {
    echo 
    "<a href=\"members.php?user={$user['username']}\">{$user['username']}</a> ";
    } else {
    echo 
    "<a href=\"members.php?user={$user['username']}\">{$user['username']}</a><br />";
    }
    $i++;
    }
    }
    echo 
    "<center>";
    ?> 
    You're a bloody Legend!
    one small favor are you able to help me get it to display maybe 5 Lines and do a pagination type thing?
    Thank-you,
    Christopher Holland

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

    Latest Awards:


  6. #16
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    I'm sorry to say this, but can you not just Google PHP Pagination and easily see how to format your queries and display to do this?

Page 2 of 2 FirstFirst 12

Posting Permissions

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