Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 php connect mysql~

views
     
Seventh7
post Jan 28 2006, 01:00 PM

Regular
******
Senior Member
1,490 posts

Joined: Sep 2004

please make sure that u change the $user, $password, $database according to ur username, password and database name u have created.
Seventh7
post Jan 29 2006, 01:30 AM

Regular
******
Senior Member
1,490 posts

Joined: Sep 2004

lets try with simple code first

go to mysql, create a new database and a table

in this example, i put a new database name is mydb and the table name is mytab

so u try put the code in here ur php and see if it can connect or not

<?php
$conn = mysql_connect("localhost");
mysql_select_db("mydb") or die("error connecting to dbase");

?>

try that..and come back to us to update...........



 

Change to:
| Lo-Fi Version
0.0162sec    1.24    6 queries    GZIP Disabled
Time is now: 24th December 2025 - 12:00 PM