Databases Reference
In-Depth Information
echo "\n<h3><font color=\"red\">Your Basket is Empty!".
"</font></h3>";
}
else
{
// Yes, so show the gifts as a table
echo "\n<table border=1 width=100%>";
// Create some headings for the table
echo "\n<tr>" .
"\n\t<th>Quantity</th>" .
"\n\t<th>Gift</th>" .
"\n\t<th>Colour</th>" .
"\n\t<th>Available From</th>" .
"\n\t<th>Price</th>" .
"\n\t<th>Action</th>" .
"\n</tr>";
// Fetch each database table row of the results
while($row = @ mysqli_fetch_array($result))
{
// Display the gift data as a table row
echo "\n<tr>" .
"\n\t<td>{$row["quantity"]}</td>" .
"\n\t<td>{$row["description"]}</td>" .
"\n\t<td>{$row["color"]}</td>" .
"\n\t<td>{$row["shop"]}</td>" .
"\n\t<td>{$row["price"]}</td>";
// Are we showing the list of gifts reserved by the
// user?
if ($show_user_selection == SHOW_UNRESERVED_GIFTS)
// No. So set up an embedded link that the user can click
// to add the gift to their shopping list by running
// action.php with action=add
echo "\n\t<td><a href=\"action.php?action=add&" .
"gift_id={$row["gift_id"]}\">".
"Add to Shopping List</a></td>";
else
// Yes. So set up an embedded link that the user can click
// to remove the gift to their shopping list by running
// action.php with action=remove
echo "\n\t<td><a href=\"action.php?action=remove&" .
"gift_id={$row["gift_id"]}\">".
"Remove from Shopping list</a></td>";
}
echo "\n</table>";
}
}
}
?>
<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
 
Search WWH ::




Custom Search