<?
//N7 Xmas Wish List V.1.0.1
//Another free product brought to you by the N7 Design group.
//The N7 Design group is a partner of Southern Comp Solutions LLC
//(http://www.southerncompsolutions.com
//The N7 Design group's only mission and goal is to provide open source programs that anyone can use
//If you like this project or support the open source movement please help out by donating to our
//cause paypal (hide@address.com) or from our sourceforge project page (all donations on the
//sourceforge project page include a 25% donation to sourceforge.)
include "header.php";
$num_rows = 0;
//$i = 0;
$str = strtolower($sort);
$connect = mysql_pconnect ("$dbhost", "$dbuser", "$dbpassword") or die ("Could not connect");
$db = mysql_select_db ("$dbname", $connect) or die ("Could not find database");
$login = mysql_query ("SELECT * FROM xmas_list WHERE name = '$str' ORDER by 'purchased'") or die ($mysql_error());
$num_rows = mysql_num_rows($login);
echo "<center>";
echo "<h2>Christmas Wish List For $str</h2>";
echo "<table width=\"95%\" border=\"1\" cellspacing=\"3\">";
echo "<tr>";
echo "<td>Item Requested</td>";
echo "<td></td>"; // Comment this out to remove purchased field from lists.
echo "</tr>";
$i = 0;
while ($i < $num_rows){
$item = mysql_result ($login,$i,"item");
$purchased = mysql_result ($login,$i,"purchased");
if ($purchased == "Yes"){ $purchased = "*"; }
if ($purchased == "No"){ $purchased = ""; }
echo "<tr>";
echo "<td><b>$item</b></td>";
echo "<td><b>$purchased</b></td>"; // Comment this out to remove purchased field from lists.
echo "</tr>";
$i++;
}
echo "</table>";
echo "</center>";
include "footer.php"; ?>