Jump to content


Photo

Problem With Connecting To Database (Page 77)


  • Please log in to reply
1 reply to this topic

#1 PTheo

PTheo

    New Member

  • Members
  • Pip
  • 3 posts

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. error.jpg

#2 PTheo

PTheo

    New Member

  • Members
  • Pip
  • 3 posts

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 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users