User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 425,896 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,907 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums
Views: 344 | Replies: 1
Reply
Join Date: Jun 2008
Posts: 31
Reputation: punithapary is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
punithapary punithapary is offline Offline
Light Poster

mysql and php connection

  #1  
Jun 26th, 2008
Hi ,
Can anyone tell me is there any other connection method(mysql with php) other than this.Please help me..
  1. $hostingname="localhost";
  2. $username="root";
  3. $password="";
  4. $dbname="test";
  5. $rr=mysql_connect("$hostingname","$username","$password")or die(mysql_error());
  6. mysql_query($rr);
  7. mysql_select_db($dbname) or die(mysql_error());


thanks
Punithapary
Last edited by peter_budo : Jul 5th, 2008 at 12:39 pm. Reason: Keep It Organized - please use [code] tags
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2006
Location: Remunj
Posts: 207
Reputation: pritaeas is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 25
pritaeas's Avatar
pritaeas pritaeas is offline Offline
Posting Whiz in Training

Re: mysql and php connection

  #2  
Jun 26th, 2008
You can use mysqli or pdo, both are documented on php.net. If you have PEAR installed you can use MDB or MDB2. More info on pear.php.net
"Premature optimization is the root of all evil."
Donald Knuth / Tony Hoare
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb MySQL Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the MySQL Forum

All times are GMT -4. The time now is 7:32 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC