Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Username

  1. #1
    Banned
    Join Date
    Feb 2008
    Location
    USA
    Posts
    61
    Thanks
    15
    Thanked 1 Time in 1 Post

    Username

    Hey. I'm making a forum and when you view the post it will show the username details which is selecting from the database.

    I don't know hwo to make it get only ONE and the right user who posted the thread/reply.
    How can I do this?

    Right now if I select it from the database it will show All of the users when really it should show only the user who posted the thread/reply.

    Thanks

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Why are you trying to make a forum when there are many already created forum scripts out there?
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Regular Coder
    Join Date
    Mar 2007
    Posts
    357
    Thanks
    46
    Thanked 22 Times in 21 Posts
    First off, when the user posts store the user that posted in the post entry. Then when you are getting the post entry, you just find out whats inside the posted user entry and do for example:

    "SELECT * FROM `users` WHERE `Username` = '$sqlResult[USERNAME]'"

    Thats how i'm doing it for the forums i'm making, but... theres probably a better way.


  •  

    Posting Permissions

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