tata, here is what you need:
<?
$host ="your_host_name";
$user ="your_db_user";
$password="your_db_pwd";
$db_name = "your_database_name"
mysql_connect($host,$user,$password)
or die("can't connect to database");
$my_query = "SELECT * FROM books ORDER by title";
$result = mysql_db_query($db_name, $my_query);
while ($content = mysql_fetch_object ($result))
{
$id = $content -> id;
$subject = $content -> subject;
$title = $content -> title;
echo "$id -- $subject -- $title;
}
?>
Gerhard
can any body give me a sample php-mysql code for me to start?
i have all php and mysql setup correct.
i have a table 'books' with fields id,subject and title.
i just want the code to display all the records of my 'books' table.
thank you very much