purelife173 — 2012-05-03T21:01:27-04:00 — #1
$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
jason__c — 2012-05-03T21:51:50-04:00 — #2
Not an expert at PHP, but shouldn't there be no space between "t" and "("? Just a shot.
purelife173 — 2012-05-03T21:59:36-04:00 — #3
I tried that already
ryanreese — 2012-05-03T22:29:52-04:00 — #4
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.
purelife173 — 2012-05-03T22:51:46-04:00 — #5
Apache/2.2.22 (Win32) PHP/5.2.17
What is the base and Root (the what you see when you open a file)?
mandes — 2012-05-04T05:03:38-04:00 — #6
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.
theraptor — 2012-05-04T08:21:44-04:00 — #7
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.