-1

Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in C:\xampp\htdocs\netbanking\dbconnection.php on line 2

Fatal error: Uncaught Error: Call to undefined function mysql_error() in C:\xampp\htdocs\netbanking\dbconnection.php:5 Stack trace: #0 C:\xampp\htdocs\netbanking\index.php(4): include() #1 {main} thrown in C:\xampp\htdocs\netbanking\dbconnection.php on line 5

Madhur Bhaiya
  • 27,326
  • 10
  • 44
  • 54
seiso
  • 1
  • 1

1 Answers1

-1

you would better use mysql_connect() instead of mysqli_connect() You can search how you can use this function in google. If it didn't work,check your database name in phpmyadmin maybe it dosent match the one you are calling. Hope it helps Bye

  • 1
    *"you would better use mysql_connect() instead of mysqli_connect()"* - You can't be serious. You're telling them to use a deprecated api and deleted in recent versions of PHP over one that is recent; I don't get that. – Funk Forty Niner Sep 15 '18 at 13:09
  • actually i have tried mysql_connect() also, still getting the same error. Is it because i am using php 7? I heard that php7 no longet support sql, it supports either sqli or PDO. – seiso Sep 15 '18 at 13:10
  • i don't think so. i'm using php 7 with mysql – sina maleki Sep 15 '18 at 18:00