i have been trying to complete this script to output the titls column
only gives me Resource id #3
at moment
<?php
$host = 'localhost';
$user = 'xxxxxx';
$pass = 'Xxxxxxxx';
mysql_connect($host, $user, $pass);
mysql_select_db($user);
$result = mysql_query("SELECT title FROM books");
if(!$result) die("Query Failed.");
while($row = mysql_fetch_row($result)) {
/*
$row[0] now contains the first column of the current row,
index 1 is the second, etc.
*/
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
" <html xmlns=" xml:lang="en" lang="en"> <head>
<meta http-equiv="content-type"
content="text/html; charset=iso-8859-1" />
<title>first mysql php action</title>
</head>
<body>
<?php echo "$result"
?>
</body>
</html>
only gives me Resource id #3
at moment
<?php
$host = 'localhost';
$user = 'xxxxxx';
$pass = 'Xxxxxxxx';
mysql_connect($host, $user, $pass);
mysql_select_db($user);
$result = mysql_query("SELECT title FROM books");
if(!$result) die("Query Failed.");
while($row = mysql_fetch_row($result)) {
/*
$row[0] now contains the first column of the current row,
index 1 is the second, etc.
*/
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
" <html xmlns=" xml:lang="en" lang="en"> <head>
<meta http-equiv="content-type"
content="text/html; charset=iso-8859-1" />
<title>first mysql php action</title>
</head>
<body>
<?php echo "$result"
?>
</body>
</html>