PLZZ HELP ME!! IN PHP MYSQL CONNECTIVITY

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
sujit.tinku
Forum Newbie
Posts: 2
Joined: Sat Jul 16, 2005 4:00 pm
Location: India
Contact:

PLZZ HELP ME!! IN PHP MYSQL CONNECTIVITY

Post by sujit.tinku »

HI
I AM SUJIT MANDAL NEW MEMBAR OF THIS FORUM.
AS I AM BEGINNER IN PHP THATS WHY I AM ASKING YOU ALL GIVE THE CODE OF PHP-MYSQL CONNECTIVITY.TELL ME THE PROCESS ALSO..PLZ HELP ME !! ITS URGENT.

mail me at ....
sujit.tinku@gamil.com
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

look at the mysql functions in the manual:

more specifically mysql_connect() and mysql_select_db().

ex:

Code: Select all

$host = "127.0.0.1";
$user = "bob";
$pass = "bobspass";
$db = "database";
mysql_connect($host,$user,$pass)
   or die(mysql_error());
mysql_select_db($db)
   or die(mysql_error());
e specifically mysql_connect() and mysql_select_db().

ex:

Code: Select all

$host = "127.0.0.1";
$user = "bob&quote;;
$pass = &ysql_connect]mysql_connect()[/url] and [url=http://www.php.net/mysql_select_db]mysql_select_db()[/url].

ex:

Code: Select all

$host = &quote;127.0.0.1&quote;;
$user = &quote;bob&quote;;
$pass = &quote;bobspass&quote;;
$db = &quote;database";
mysql_connect($host,$user,$pass)
   or die(mysql_error());w.php.net/mysql_select_db]mysql_select_db()[/url].

ex:

Code: Select all

$host = "127.0.0.1";
$user = "bob";
$pass = "bobspass";
$db = "database&quote] and [url=http://www.php.net/mysql_select_db]mysql_select_db()[/url].

ex:

Code: Select all

$host = "127.0.0.1";
$user = "bob";
$pass = "bobspass";
$db = "database";
mysql_connect($host,$user,$pass)
   or die(mysql_error());
mysql_select_db($db)
   or die(mysql_error());
functions in the manual:

more specifically mysql_connect() and mysql_select_db().

ex:

Code: Select all

$host = &quote;127.0.0.1&quote;;
$user = &quote;bob&quote;;
$pass = &quote;bobspass&quote;;
$db = &quote;database&quote;;
mysql_connect($host,$user,$pass)
   or die(mysql_error());
mysql_sefunctions in the manual:

more specifically [url=http://www.php.net/mysql_connect]mysql_connect()[/url] and [url=http://www.php.net/mysql_select_db]mysql_select_db()[/url].

ex:

Code: Select all

$host = "127.0.0.1";
$user = "bob";
$pass = "bobspass";
$db = "database";
mysql_connect($host,$user,$pass)
   or die(mysql_error());
mysql_select_db($db)
   or die(mysql_error());
mysql_connect]mysql_connect()[/url] and mysql_select_db().

ex:

Code: Select all

$host = "127.0.0.1";
$user = "bob";
$pass = "bobspass";
$db = "database";
mysql_connect($host,$user,$pass)
   or die(mysql_error());
mysql_select_db($db)
   or die(mysql_error());
nect()[/url] and mysql_select_db().

ex:

Code: Select all

$host = &quote;127.0.0.1&quote;;
$user = &quote;bob&quote;;
$pass = &quote;bobspass&quote;;
$db = "database";
mysql_connect($host,$user,$pass)
   or die(mysql_error());
mysql_select_db($db)
   or die(mysql_error());
ically [url=http://www.php.net/mysql_connect]mysql_connect()[/url] and [url=http://www.php.net/mysql_select_db]mysql_select_db()[/url].

ex:

Code: Select all

$host = "127.0.0.1";
$user = "bob";
$pass = "bobspass";
$db = "database";
mysql_connect($host,$user,$pass)
   or die(mysql_error());
mysql_select_db($db)
   or die(mysql_error());
]
$host = "127.0.0.1";
$user = "bob";
$pass = "bobspass";
$db = "database";
mysql_connect($host,$user,$pass)
or die(mysql_error());
mysql_selecuote;;
mysql_connect($host,$user,$pass)
or die(mysql_error());
mysql_select_db($db)
or die(mysql_error());
the manual:

more specifically mysql_connect() and mysql_select_db().

ex:

Code: Select all

$host = "127.0.0.1";
$user = "bob";
$pass = "bobspass";
$db = "database";
mysql_connect($host,$user,$pass)
   or die(mysql_error());
mysql_select_db($db)
   or die(mysql_error());
= "bob";
$pass = "bobspass";
$db = "database";
mysql_connect($host,$user,$pass)
or die(mysql_error());
mysql_select_db($db)
or die(mysql_error()ost,$user,$pass)
or die(mysql_error());
mysql_select_db($db)
or die(mysql_error());

$host = "127.0.0.1";
$user = "bob";
$pass = "bobspass";
$db = "database";
mysql_connect($host,$user,$pass)
or die(mysql_error());
mysql_select_db($db)
or die(mysql_error());
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

BTW... Please don't post in BLOCK CAPITALS. It doesn't make anybody answer your post any faster. In fact, I find it takes twice as long to read.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Furthurmore posting PLZZZZ HELP in your topic/desription/post will not make me want to reply any faster.
Post Reply