Jump to content

Recommended Posts

With PHP/MYSQL i have made a form so you can register and it puts your information into the database.

 

I need to make a login box which i think i can half do, I need to use a input box and see if it exist which im pretty sure i can do but i dont know how i set the browser to know that ive logged in, if that makes sense?

 

Also my second question is how do i display data from mysql database onto the screen so its like:

 

Name: 'mysql info'

Link to comment
https://forums.phpfreaks.com/topic/182160-displaying-information-and-logging-in/
Share on other sites

First question: use sessions

Second question: You write Name: as string and echo mysql if no right after it

 

Its really easy to google some tutorials about this

 

you answered just as i solved it :P...the 'sessions' shall i search on google for 'php/mysql sessions' for some tutorials? i didnt work this bit out

sessions will be the key. Here is a good tutorial on Sessions and cookies, both of which you will probably want to use for a login system.

 

If you get confused or need help with part of the concepts please post here after reading that tutorial above.

Ive read the introduction to this and i got a few noob questions:

 

(1)What is a header? it is saying "Because the setcookie() function is sending headers" and im not sure what a header is...

 

 

and actually thats main thing i wanna know so far, im reading rest once i posted this

As defined by google:

In information technology, header refers to supplemental data placed at the beginning of a block of data being stored or transmitted. In data transmission, the data following the header are sometimes called the payload or body.

 

So it is the initial data that is sent to the browser, after data is sent this initial block is locked, so you have to send all your headers before any output is sent to the client, because after that you are on the body of the document, thus it will cause an error. I hope that I explained it correctly, if not anyone can feel free to correct me.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.