Hi,
I really need your help badly.
Please help me to create a script.
I have created a database with table `employee`
employeeid
fname
lname
mi
designation
salary
username
password
I have created 2 forms, login_form.php and profile_form.php.
I want to see my profile when I login. I dont have an idea to do that.
Please help thanks
sorry for previous posting
Moderator: General Moderators
Re: sorry for previous posting
It's pretty straightforward. Query the employee table based on the username and password provided in the login form. If it returns a result, the credentials are good, so set some cookie and/or session data and forward the user to the profile page.
What have you got so far?
What have you got so far?
Re: sorry for previous posting
Hi,Celauran made it right. Firstly check the entered username and password matches with that of the stored one in database.if it is success,store the username to a session variable like
then redirect to profile page using
At the profile page start the session first with session_start() and using the stored session variable($_session['username']) pull out the other values from the table.
Hope it helps...
Code: Select all
$_session['username']=$username;Code: Select all
header(Location:profile.php);Hope it helps...
Re: sorry for previous posting
thank will try thank you so much