OOP Bugs

Home Forums Bugs OOP Bugs

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1414
    samiolelezi
    Participant

    Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘date’ in ‘field list’ in C:\xampp\htdocs\OOP\classes\db.class.php:48 Stack trace: #0 C:\xampp\htdocs\OOP\classes\db.class.php(48): PDOStatement->execute(Array) #1 C:\xampp\htdocs\OOP\classes\user.class.php(68): DB->run() #2 C:\xampp\htdocs\OOP\signup.php(6): User->create(Array) #3 {main} thrown in C:\xampp\htdocs\OOP\classes\db.class.php on line 48

    #1415
    samiolelezi
    Participant

    the error is in the user.class that im inserting

    public function create($POST){

    $errors = array();
    $arr[‘username’] = ucwords(trim($POST[‘username’]));
    $arr[’email’] = trim( $POST[’email’]);
    $arr[‘password’] = $POST[‘password’];
    $arr[‘gender’] = trim($POST[‘gender’]);
    ->$arr[‘date’] = date(“Y-m-d H:i:s”);
    if you declared data instead of date will give you this kind of errror
    it might say it has errors in db.class but you will check if the mistake is given in db.class or user.class

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.