$link = mysqli_connect ('localhost', 'root', 'nestle324');
$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.';
I keep getting this error:
Fatal error: Call to undefined function mysqli_connect() in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\connect\index.php on line 2
Not an expert at PHP, but shouldn't there be no space between "t" and "("? Just a shot.
I tried that already
I have this online on my website. http://www.ryanreese.us/asdf.php
There's no error coming up. What version of PHP are you running? The only thing I changed was the database login details.
Edit-I moved the file from the base, into the root. So you can't get to it. But it basically only says the error about the joke database not being able to be selected. Which, if I gave it my database name, it wouldn't have that issue.
Apache/2.2.22 (Win32) PHP/5.2.17
What is the base and Root (the what you see when you open a file)?
try changing all the "mysqli" statements to "mysql"
if no luck make a php file with the statement
run that and post the results here.
Since you have two threads on the same topic, to keep the discussion easier to keep track of, I'm closing this thread.
Please continue the discussion in your other thread here.