By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,959 Members | 1,525 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,959 IT Pros & Developers. It's quick & easy.

How to connect to the Mysql from PhP

P: 25
i want some code to connect to the mysql
Aug 6 '07 #1
Share this Question
Share on Google+
3 Replies


kovik
Expert 100+
P: 1,044
i want some code to connect to the mysql
Well, there's a nifty little function by the name of mysql_connect(). If you want code, look at examples. Don't be lazy this early in your programming career.
Aug 6 '07 #2

nathj
Expert 100+
P: 938
i want some code to connect to the mysql
Also, one thing to check, and check now as it will save you time. Did you actually install the MySQL components of PHP? Have you installed php? I spent ages helping someone the other day and then discovered that PHP wasn't installed.

So please check these tiems by running a small php file:

[php]
<?php
phpInfo();
?>
[/php]

Sorry to be patronising, but it's best to check the fundamentals are in place.

Cheers
nathj

PS. When I first started with PHP and MySQL I didn't realise there was a specific step during the PHP install process, so my own experience leads to this question.
Aug 6 '07 #3

ak1dnar
Expert 100+
P: 1,584
i want some code to connect to the mysql
Ahha ! Here Give It a try.


[Edit : Removed "Hello" from the Thread Title]
Hello How to connect to the Mysql from PhP
Aug 6 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.