could anyone post a php code for database
Moderator: General Moderators
could anyone post a php code for database
hi, could anyone post an simple example on how to connect to database and retrieve data from the database......if can, could u pls, pls, pls, pls help me..... i need it very urgently..........
Last edited by peacer on Tue Dec 02, 2003 12:03 am, edited 1 time in total.
Check out this link:
http://www.php.net/mysql
The manual has a listing of all the PHP functions and what they do. I'd keep it bookmarked and browse around it often to better enhance your learning.
Cheers.
http://www.php.net/mysql
The manual has a listing of all the PHP functions and what they do. I'd keep it bookmarked and browse around it often to better enhance your learning.
Cheers.
i cant get wad i want
the address u gave me is not wad i know, i know is the sample of a dataase connection........
you are still going to need to read the manual link that sami posted if you are ever going to learn anything about interaction with mysql...
but here you go anyways :
but here you go anyways :
Code: Select all
mysql_connect ('localhost', 'username', 'password');
mysql_select_db('bob');
$foo = "Select me from table";
$bar = mysql_query($foo);
$row=mysql_fetch_assoc($bar);
echo $row['me'];