FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Edit Profile script





fromegame
Hello, I have 2 questions:

Question 1:
As in phpbb you can change your profile. I want to do this in my website, I have a log-in and register script with PHP and MySQL. Now I want to make a system that people can change their password etc.
How can I do that?!?!

Question 2:
In the same website I want to make an option that people can see their data in a page. Like username etc. but that no one else can see that.

My site is www.frome.frih.net
Thank you very much!
Antoine_935
You can easilly make both, since you already have a registering system.
Simply create a new SQL table with correspondance between username / userID and their data.
Then you can easily create a page to modify this.

For the second question, well...
Make a page where the user is automatically presented HIS informations, and he can't choose the person he wants to see
fromegame
1. Ok, I get it.

2. I don't get it, how can I make it that he can ONLY show his own information?
Traveller
fromegame wrote:
1. Ok, I get it.

2. I don't get it, how can I make it that he can ONLY show his own information?


That's all up to how you code the queries for MySQL. As long as you already know a user is logged in, you already know enough information to identify him within the database. Just code that into your WHERE clause for any queries relating to what you plan to do.

That is such basic MySQL, that if you don't understand it, you will probably have difficulty coding the actual functionality you wish to add. It would probably be a good idea to go through the SQL tutorial at w3schools or, maybe even better for the kind of things you wish to do, this set of PHP and MySQL tutorials.
fromegame
I know what the WHERE thingy is...
So blablalba WHERE username = '$username';
But how can i define $username to the username where someone has been logged in to?
Antoine_935
if some user is logged in, then you have $_SESSION vars.
Include in this SESSION vars the name of the user. And then get it back when you need it.
fromegame
Ty, that's what I wanted to hear, lock!
Related topics
Simple PHP Login Script
Profile
Need A Custom Script Developed !!! Payin Good !!!!
Problem with Member system(or template) and $_GET[id]
Is there any way to block script with css?
More of a report,
Profile
[PHP] Calling dynamic pictures
Shopping Cart
changing phpbb disabled message
[Community Project] Easy Simple Content Management System
Frih points at top of page?
A copy of milliondollarhomepage
Where;s better way using javascript link or write inside htm
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.