whats wrong
| From: | saeed ahmed | Date: | Sat, 31 Mar 2012 06:45:56 +0000 |
| Subject: | whats wrong | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-317386@lists.php.net to get a copy of this message | ||
i have made a php script with a tutorial help....i dont know where is a
error.please have a look
<?php
//connect and select a database
mysql_connect("localhost","root"," " );
mysql_select_db("addressbook");
//Run a query
$result=mysql_query("select("SELECT*FROM COLLEAGUE");
?>
<!DOCTYPE html PUBLIC"-//w3c//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Address Book</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8"
</head>
<body>
<h1>Address Book<h1>
<table Border="1" cellpadding="2"cellspacing="3"
summary="table holda colleague contacts information">
<tr>
<th> ID</th>
<th>First Name</th>
<th>Last Name</th>
<th>Telephone</th>
<th>Email Address</th>
</tr>
<?php
//LOOP through all table rows
while ($row=mysql_fetch_array($result)) {
echo"<tr>";
echo"<td>".$row['id'] . "</td>;
echo "<td>" . $row['firstName'] . "</td>";
echo "<td>" . $row['lastName'] . "</td>";
echo "<td>" . $row['telephone'] . "</td>";
echo "<td>" . Srow['email'] . "</td";
echo"</tr>";
}
//free result memory and close database connection
mysql_free_result($result);
mysql_close();
?>
</table>
</body>
</html>
thanks