hi everyone my name is bail
i am on chapter four of the build your own database driven website the 4th edition
i am geting an error when i copy the code from the book it is connecting to the database but there is error before it
here is the error:
Warning: mysqli_connect() [function.mysqli-connect]: Headers and client library minor version mismatch. Headers:50051 Library:50148 in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\connect\index.php on line 3
Database connection established.
here is the code im using:
$link = mysqli_connect('localhost', 'root', 'bailuk');
$output = 'Unable to connect to the database server.';
if (!mysqli_set_charset($link, 'utf8'))
$output = 'Unable to set database connection encoding.';
if (!mysqli_select_db($link, 'ijdb'))
$output = 'Unable to locate the joke database.';
$output = 'Database connection established.';
could any one help please im new to php and mysql thanks
thanks for your reply but the problem i have is i can only get thses two versions to run togther from the book install?
That isn't a mysql error, it is a php error. you need to update either your PHP or Apache install.