|
i have the following code:
<?php
include password.inc");
$connection = mysql_connect($host,$user,$password)
or die ("couldn't connect to server");
$db = mysql_select_db($database,$connection)
or die ("Couldn't find databse");
/* Select pets of the given type */
$query = "SELECT * FROM blah";
$result = mysql_query($query)
or die ("Couldn't execute query.");
while ($row = mysql_fetch_array($result,MYSQL_ASSOC))
{
/*display row */
echo "<tr>\n";
echo "<td class='content' bgcolor='#ebebeb'>
<a href='actor.php?actor_id={$row['StarID']}'>{$row['Star_Name']}</a> \n</td>";
echo "</tr>\n";
}
?>
how do i change this so that it only displays the data if there are matching records in my database?
|