i have tryed to connect to the database but it is saying Unable to locate the joke database.
bit the database ijdb is there as is joke any one know why this is happening
the joke as jokes in it ect but ive tryed everythin i can think of i am new to php my sql but it wa working then it as stoped i have the right details in the connect index.php page which is below i do not use password because im just learning, anyone can help please send me email or you can contact me on skype or msn or yahoo all help will be greatful thanks paul
here is my code
PHP Code:<?php
$link = mysqli_connect('localhost', 'ijdb', '');
if (!$link)
{
$output = 'Unable to connect to the database server.';
include 'output.html.php';
exit();
}
if (!mysqli_set_charset($link, 'utf8'))
{
$output = 'Unable to set database connection encoding.';
include 'output.html.php';
exit();
}
if (!mysqli_select_db($link, 'ijdb'))
{
$output = 'Unable to locate the joke database.';
include 'output.html.php';
exit();
}
$output = 'Database connection established.';
include 'output.html.php';
?>











Bookmarks