1 thought on “Learn to connect database in php

  1. 1st error
    Parse error: syntax error, unexpected ‘mydatabase’ (T_STRING) in C:xampphtdocsconnectindex.php on line 8
    2nd error
    you don’t mention anywhere aboutcreating database in phpmyadmin thus leadin us to next error
    3rd

    Warning: mysqli_connect(): (HY000/1045): Access denied for user ‘root’@’localhost’ (using password: NO) in C:xampphtdocsconnectindex.php on line 5
    Failed to connect to database: Access denied for user ‘root’@’localhost’ (using password: NO)
    Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in C:xampphtdocsconnectindex.php on line 20

    Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in C:xampphtdocsconnectindex.php on line 23
    THIS IS THE EMPLOYEES TABLE

    Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in C:xampphtdocsconnectindex.php on line 43
    ID# First Name Last Name Dept Email

Leave a Reply

Your email address will not be published. Required fields are marked *