i am new to php and try to connect to database with is on my hosting site.
mysql_connect('host','username','password');
host: example.com
username/password: should i use c-panel's username and password to connect to my database?
database connection
Moderator: General Moderators
Re: database connection
Maybe: could be the same username and password, could be something separate. Try it. Also check in the CPanel for something about databases or database users.
Just starting out, right? The mysql_* functions are old and unsupported for recent PHP. You should be using the PDO or mysqli functions instead. Are you reading from a tutorial or something?
Just starting out, right? The mysql_* functions are old and unsupported for recent PHP. You should be using the PDO or mysqli functions instead. Are you reading from a tutorial or something?
Re: database connection
i am reading from tutorials and getting a lot errors at every new step
can you provide me some source to learn php (new php or today's php)