Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

School project. Need to link sql database to HTML website. I have manage to do a

ID: 3880343 • Letter: S

Question

School project. Need to link sql database to HTML website. I have manage to do a login function but don't know how to link it to another page which shows other data such as account balance of the user that is login.
School project. Need to link sql database to HTML website. I have manage to do a login function but don't know how to link it to another page which shows other data such as account balance of the user that is login.
I have manage to do a login function but don't know how to link it to another page which shows other data such as account balance of the user that is login.

Explanation / Answer

you should use the session in php.

Sessions are a simple way to store data for individual users against a unique session ID. This can be used to persist state information between page requests. Session IDs are normally sent to the browser via session cookies and the ID is used to retrieve existing session data.

so in session you can store your login information and at any page you can use these informations using session veriables.

first you have to start a session using session_start() then store the information of user

for example $_session['userid']=userid of the user which you have retrive from your database using sql queries.

after storing login information you can use these stored information at any page by starting a session at first line of the code .

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote