For the life of me i can not figure out what is not working in this code all i get is a blank page when i shoud get a result any hep would be welcome.
<?
$usr = "ecom";
$pwd = "*";
$db = "ecom";
$host = "localhost";
# connect to database
$cid = mysql_connect($host,$usr,$pwd);
if (!$cid) { echo("ERROR: " . mysql_error() . "\n"); }
?>
<HTML>
<HEAD>
<TITLE>Display Link</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" >
<form action="search.php">
What do you want to search for: <input type="text" name="name1"><br>
<input type="submit" name="submit" value="submit">
</form>
<?
$tim = "Local Docs";
$name1 = $_POST['name1'];
setup SQL statement
$SQL = "SELECT * FROM video WHERE name LIKE '$name1%'";
# execute SQL statement
$retid = mysql_db_query($db, $SQL, $cid);
# check for errors
if (!$retid) { echo( mysql_error()); }
else {
# display results
while ($row = mysql_fetch_array($retid)) {
$smallpic = $row["smallpic"];
$name = $row["name"];
$price = $row["price"];
$type = $row["type"];
echo ("<DD><table width=75% border=1 cellspacing=4 cellpadding=15>
<tr>
<td>$smallpic</td>
<td>Name: $name</td>
<td>Type: $type</td>
<td> Cost: $price</td>
</tr>
</table></DD>\n");
}
echo ("</DT></P>");
}
?>
</BODY>
</HTML>