🔒 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.

About this Thread

  • 5
    Replies
  • 1K
    Views
  • 6
    Participants
Last reply from:
YokaiDesuDesu

Trending Topics

Online now

Members online
1,244
Guests online
4,681
Total visitors
5,925

Forum statistics

Threads
2,313,591
Posts
29,174,545
Members
1,184,791
Latest member
nansja81
Back
Top