Forum Stats

  • 3,876,226 Users
  • 2,267,082 Discussions
  • 7,912,474 Comments

Discussions

Connect website to MySQL

2903054
2903054 Member Posts: 2
edited Mar 13, 2015 8:36PM in PHP

Hello, I'm having some problems connecting my site to the database. After changing the code to the new "mysqli" standard, the web page went full with errors.
Can someone please tell me how can I fix them? When I first tested the code (another buggy version) it was all working perfect.

I can't find help anywhere on the internet so I thought trying my luck here...

Here are the errors:

Included in the header.php file...

Warning: mysqli_query() expects at least 2 parameters, 1 given in /home/a9231560/public_html/inc/incfiles/header.inc.php on line 11

Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, null given in /home/a9231560/public_html/inc/incfiles/header.inc.php on line 12

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in /home/a9231560/public_html/inc/incfiles/header.inc.php on line 13

Included in the index.php file...

Warning: mysqli_query() expects at least 2 parameters, 1 given in /home/a9231560/public_html/index.php on line 36

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in /home/a9231560/public_html/index.php on line 38

Warning: mysqli_query() expects at least 2 parameters, 1 given in /home/a9231560/public_html/index.php on line 40

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in /home/a9231560/public_html/index.php on line 42

Warning: mysqli_query() expects at least 2 parameters, 1 given in /home/a9231560/public_html/index.php on line 64


I can provide the source-code if needed!

Message was edited by: df950782-4fb7-43f5-a720-a621d8651b92

Tagged:

Answers

This discussion has been closed.