$var = mysqli_connect (host, user, passwd [, dname [, port [, socket] ] ] )
Use: (in the CS377 course)
host = "holland.mathcs.emory.edu"
user = "cs377"
passwd = "abc123"
return value:
$var = an mysqli "object" which represents the connection to a MySQL Server.
|
$conn = mysqli_connect("holland.mathcs.emory.edu", "cs377", "abc123", "companyDB"); /* ------------------------------------ check for connection error ------------------------------------ */ if ( mysqli_connect_errno( ) != 0 ) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } |
Comment:
|