O'Reilly Forums: Problem With Connecting To Database (Page 77) - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Problem With Connecting To Database (Page 77)

#1 User is offline   PTheo 

  • New Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 10-March 12

Posted 10 March 2012 - 04:47 AM

Hi guys.

I am using wampserver for my PHP and MySQL. I've created the tables and I have the PHP script ready and correct but it does not connect to the database.

When I use this on the report.php
$dbc = mysqli_connect('localhost', '', '', 'aliendatabase')
or die('Error connecting to MySQL server.');

I get the error in the attachment. Anyone can help.

Note: There is no username or password that's why I have empty quotes. However whenever I remove them so that I have
$dbc = mysqli_connect('localhost', '', '', 'aliendatabase')
or die('Error connecting to MySQL server.');

I get Error querying database. Attached Image: error.jpg
0

#2 User is offline   PTheo 

  • New Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 10-March 12

Posted 10 March 2012 - 06:09 AM

OK guys found the issue, it had something to do with wampserver. The script connects with the database now but I do get 'Error querying database' If anyone can help.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users