Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User Authentication

Status
Not open for further replies.
Mar 10, 2005
63
US
I am new to PHP and trying to create a simple user login. I've done many searches and they all seem great but they are including things I do not want to implement at the moment. I just want a tutorial that explains how to create a simple login that checks the user against a mySQL database. I don't need sessions or cookies, just yet. Thanks.
 
The example here is fairly simple. You could easily strip out the two session related sections of the code and instead assign the information to a couple variables or whatever you want to do with them.

signature.png
 
Thanks tarwn, that tutorial did what I needed. After getting just the login portion working, I tried the sessions. They didn't seem to work for me. I kept getting an error "Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent" What's this all about?
 
So basically the code needs to be reconstructed? Is the tutorial crap?
 
I can't answer that. I do not know what your code looks like.

I can say that the operative sentence in section 1.4 of faq434-2999 is:
To take care of the error, reorganize your code so that any header-manipulating functions appear at a point in the logic of your code that no output has been produced.

The offending header-manipulating function in your code, according to the error you posted, is session_start().

Combining the two facts seems to be:

To take care of the error, reorganize your code so that session_start() appears at a point in the logic of your code that no output has been produced.



Want the best answers? Ask the best questions! TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top