Login | Register | FAQ
Anonymous

WHERE CAN I PUT THIS CODE THAT CONNECT TO DATA BASE XAMPP?

+ Post a reply

2 posts Page 1 of 1


WHERE CAN I PUT THIS CODE THAT CONNECT TO DATA BASE XAMPP?

by CENT CI » Tue Sep 27, 2016 10:40 am

mysql_connect("localhost", "root", "") or die (mysql_error());

Is it suppose to be in the same page, or am suppose to create another php file for it.
User avatar

CENT CI

  • Posts: 1
  • Joined: Tue Sep 27, 2016 10:30 am

Re: WHERE CAN I PUT THIS CODE THAT CONNECT TO DATA BASE XAM

by Farhin Qureshi » Wed Jan 11, 2017 11:31 am

You must put the following code:
Code: Select all
mysql_connect("localhost", "root", "") or die (mysql_error());
on the same PHP page
and no need to make the different file for it .If it occurs error then you need to recheck the password.
User avatar

Farhin Qureshi

  • Posts: 45
  • Joined: Tue Jan 03, 2017 11:33 am
--
Farhin Qureshi
.NET Developer
http://www.ifourtechnolab.com


+ Post a reply

Page 1 of 1