Zoofu Posted August 22, 2009 Share Posted August 22, 2009 Can someone just design a simple simple script that will tell the user, according to their ID, what their name is. I'm trying to design profiles, but it's not exactly working. Quote Link to comment Share on other sites More sharing options...
deansatch Posted August 22, 2009 Share Posted August 22, 2009 select name from table_users where id = '$id' Quote Link to comment Share on other sites More sharing options...
Zoofu Posted August 22, 2009 Author Share Posted August 22, 2009 Yes but I need to think what to do with it, because when I do it... It just returns the user that's viewing it's name. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted August 22, 2009 Share Posted August 22, 2009 How about take an idea from the SMF forum software that PhpFreaks uses. All the member names that are displayed anywhere on any of the pages are links that when clicked take you to the profile page of that member. For example, your member name is the following link - http://www.phpfreaks.com/forums/index.php?action=profile;u=85553 Quote Link to comment Share on other sites More sharing options...
Aravinthan Posted August 22, 2009 Share Posted August 22, 2009 I am going to give you a simple User Management System 1) Create a table with: userid, username, email, address ( You need teh first 2, the rest you can add/remove to your likings) 2) Create a Registration form and just insert the info into DB 3) Make a loggin script (Check the username and password provided from the form to see if the user actually exists) If a user exists, fetch the userid from the Database and put it in the link. Something to get you started: Use if mysql_rows. And the link would be: www.yoursite.com/profile.php?id=userid 4) Make a profile page, DONT PUT ANY DB stuffs yet. Just design it to your needs. Where you want to put the user's details put a default value. For exemple where you want to display his username, put username. And when your all done, Put this at the top: <?php $userid = $_GET['id']; ?> This will get the user id. And make a while loop to fetch the rest of the information, where userid = userid. I hope I was clear... If you need more help, dont hestitate Quote Link to comment Share on other sites More sharing options...
Zoofu Posted August 22, 2009 Author Share Posted August 22, 2009 I've already made the site and forum and stuff, but the profile script just wont work and I have no idea why. Thanks though. Quote Link to comment Share on other sites More sharing options...
Zoofu Posted August 22, 2009 Author Share Posted August 22, 2009 I just need someone to make a base script or something. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted August 22, 2009 Share Posted August 22, 2009 The purpose of the PHP Coding Help forum is for programmers to help other programmers with their code and with php programming questions - Do you need help with some code you wrote? Ask here! We'll get you the answers! If you want someone to write code for you, you need to post in the PHP Freelancing forum section - http://www.phpfreaks.com/forums/index.php/board,8.0.html Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.