What's new

Closed pdo oop login sample

Status
Not open for further replies.
i thinnk you only neeed this pdo function. and basic session.
like try and catch for pdo connection
$handle = new PDO("mysql:host=localhost;dbname=dbname","user","pass");
then apply try and catch for specific error in pdo attribute modification.

after the connection apply basic login form with php query after sanitizing the user and pass variables.
and query if the user and pass equals to dbname registered account.
then count the query for numrows then equall to something then give a session and
you are logging in.
 
Saglit lang .. gawan kita :)

Ayy Punta ka nalang sa W3SCHOOL. meron pala dun :)

Pero Always mong tatandaan kapag gagawan ka sa PHP .. yung DRY rule :)

Don't repeat Yourself ... Kung mag established ka ng connection .. gumawa ka ng class na tatawagin nalang yun .. Maybe, Pwede kong tawagin yun sa Term na Instance ... Also kahit sa CRUD ganun din gawin mo .. GOODLUCK
 
Status
Not open for further replies.
Back
Top