1. Welcome to PHCorner Forums. Take a moment to Sign up and gain unlimited access and extra privileges that guests are not entitled to, such as:

    All that and more! Registration is quick, simple and absolutely free. Join our community today!

PHP pdo oop login sample

Discussion in 'Coding, Programming' started by carlo0227, Jul 21, 2016.

  1. pdo oop login sample: help me guys lamat
  2. Party Poison

    Party Poison Addict Established

    alien language yang PHP wala pa ko alam dyan :hilarious:
  3. di ako programmer capslockedcapslocked -1 knowledge ko dyan:)
  4. 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.
  5. 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
Tags / Keywords: