I am trying to get info from the database but it is not working.. can some one tell me what the proplem is?
<?
// ========================================
// Get Inbound Variables
// ========================================
$txtcode = SHOW(“code”);
$txtdesciption= SHOW(“description”);
$txtprice= SHOW(“Price”);
$SEARCH_BUTTON = SHOW(“btnSearch”);
// Connect to DB
$digitalb_cpt = mysql_connect(‘localhost’, ‘digitalb_admin’, ‘admin’);
// ========================================
// Run Search SQL and Build Results
// ========================================
$rsSearchResults = mysql_query($sqlSearch, $db) or die(“$sqlSearch FAILED: ” . mysql_error());
$row_count = 0;
while ( $row = mysql_fetch_array($rsSearchResults) ) {
$row_count++;
$txtcode = $row[“code”];
$txtdesciption= str_replace(“\”, “”, $row[“description”]);
$txtprice = $row[“Price”];
if ($row_count % 2) {
$bgcolor = “#FFFFFF”;
} else {
$bgcolor = “#F2F2F2”;
}
$htmlViewNoteLink = “view_note.php?txtNoteId=$note_id”;
$htmlSearchResults .= ” <tr bgcolor=$bgcolor>n”;
$htmlSearchResults .= ” <td class=’SearchResults’>$txtcode.</td>n”;
$htmlSearchResults .= ” <td class=’SearchResults’><a href=’$htmlViewNoteLink’>$txtdesciption</a></td>n”;
$htmlSearchResults .= ” <td class=’SearchResults’>$txtprice </td>n”;
$htmlSearchResults .= ” </tr>n”;
}
@mysql_free_result($rsSearchResults);
// ========================================
// If No Results, Set Default
// ========================================
if ($htmlSearchResults == “” && $SEARCH_BUTTON != “”) {
$htmlSearchResults .= ” <tr>n”;
$htmlSearchResults .= ” <td class=’SearchResults’ colspan=’6′><I>No Notes Found. Please run query again…</I></td>n”;
$htmlSearchResults .= ” </tr>n”;
}
if ($htmlSearchResults == “” && $SEARCH_BUTTON == “”) {
$htmlSearchResults .= ” <tr>n”;
$htmlSearchResults .= ” <td class=’SearchResults’ colspan=’6′><I>Please use the form above to search for Notes.</I></td>n”;
$htmlSearchResults .= ” </tr>n”;
}
?>
<table width=”100%”>
<tr><td><form method=”get”>
<p><span class=”SmallHeader”>Search For Notes By</span></p>
<form method=”get”>
<table width=”400″ border=”0″ cellspacing=”0″ cellpadding=”1″ bordercolor=”#666666″>
<tr bgcolor=”#666666″>
<td>
<table width=”100%” border=”0″ cellspacing=”2″ cellpadding=”1″ bgcolor=”#F4F4F4″>
<tr valign=”middle”>
<td width=”50%” class=”FormText”>CPT Code:</td>
<td width=”50%”>
<input type=”text” name=”txtcode” value=”<?=$TITLE?>”>
</td>
</tr>
<tr valign=”middle”>
<td width=”50%” class=”FormText”>KeywordS:</td>
<td>
<input type=”text” name=”txtdesciption” value=”<?=$TEXT?>”>
</td>
</tr>
<tr valign=”middle”>
<td width=”50%” class=”FormText”>Price:</td>
<td class=”FormText”>
<input type=”text” name=”txtprice ” value=”<?=$CLASS_DATE?>”></td>
</tr>
<tr>
<td> </td>
<td>
<input type=”submit” name=”btnSearch” value=”SEARCH >>”>
</td>
</tr>
</table>
</td>
</tr>
</form>
</table>
<p> </p>
<table width=”100%” border=”0″ cellspacing=”1″ cellpadding=”1″>
<tr>
<td width=”5%” class=”SearchResultsHeader”> Code</td>
<td class=”SearchResultsHeader”> Description</td>
<td class=”SearchResultsHeader”> Price</td>
</tr>
<?=$htmlSearchResults ?>
</table>
<BR>
</td>
</tr>
</form>
</table>
<?