hello all. i am writing a php / mysql script that does various things, but in addition to those things i need it to get the username of whoever is using the front end. any help is greatly appreciated! also i can post some code snippets if you want a feel for what im doing.
sickly_man
0
Light Poster
Recommended Answers
Jump to PostDo you mean you need the user to submit their name?
If so you could just use and HTML form and post it to your php page for processing.
Jump to PostYou could possibly store the username in the session variable after a successful login and then insert that value in the table.
Jump to PostPost (method="post") the html control data e.g. txtusername, txtpassword to your php page. Then on your php page you need to start_session() (or something like that) and then assign a value to the session variable e.g. $_SESSION = $_POST[txtusername].
Now you can access that variable while the session is …
All 12 Replies
Cerberus
17
Junior Poster
sickly_man
0
Light Poster
Cerberus
17
Junior Poster
sickly_man
0
Light Poster
Cerberus
17
Junior Poster
sickly_man
0
Light Poster
Cerberus
17
Junior Poster
sickly_man
0
Light Poster
Cerberus
17
Junior Poster
sickly_man
0
Light Poster
Ezzaral
2,714
Posting Sage
Team Colleague
Featured Poster
blex41
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.