echo "\n
";
// Show the existing gifts for editing showgiftsforedit($connection);
?>
Jack and Jill's Wedding Gift Registry
//
If an error message is stored, show it...
if (isset($message))
echo "
{$message}
";
Overview | 579 ?>
(if you've not logged in before, makeup a username and password)
// Show a logout link echo "Logout";
// Check whether the user is Jack or Jill (username is 'jack' or
// 'jill'); if so, show a link to the gift editing page.
if($_SESSION['username']=="jack" || $_SESSION['username']=="jill")
echo " | Edit gifts";
// Connect to the MySQL DBMS and
use the wedding database - // credentials are in the file db.php if(!($connection= @ mysqli_connect(
$DB_hostname, $DB_username, $DB_password, $DB_databasename)))
showerror($connection);
// Pre-process the message data for security if(count($_GET))
$message = clean($_GET["message"], 128);
// If there's a message to show, output it if (!empty($message))
echo "\n
".
urldecode($message)."
";
echo "\n
";
// Show the gifts that are still unreserved showgifts($connection, SHOW_UNRESERVED_GIFTS);
echo "\n
Your Shopping List
";
// Show the gifts that have been reserved by this user showgifts($connection, SHOW_GIFTS_RESERVED_BY_THIS_USER);
?>
Share with your friends: