$email = $_POST["email"]; $validMail = filter_var($email, FILTER_VALIDATE_EMAIL); if ($validMail) { // get card url $myUrl = "http://" . $_SERVER['HTTP_HOST']; $_SESSION["messageSentOk"] = true; header('Location: ' . $myUrl); // set mail body with cards require "getAllCards.php"; //$body = "<!doctype html>"; //$body .= "<html>"; //$body .= "<head>"; //$body .= '<link href="../style.css" type="text/css" rel="stylesheet">'; //$body .= "</head>"; //$body .= "<body>"; $body = getAllCards("all"); //$body .= "</body>"; //$body .= "</html>"; $mailBody = "Please open this mail in a mail client that supports html."; // mail to receiver and print that it succeeded require "mailer.php"; $sn = "Kenzo&Kobe"; $se = "*****@*****.**"; $rn = "Person"; $re = $email; $subject = "ecard overview"; echo sendphpmail($sn, $se, $rn, $re, $subject, $mailBody, $body); } else { echo "Not a valid mail address!"; } } else {
<!doctype html> <html> <head> <?php require_once "../structural/head.php"; ?> </head> <body> <?php require_once "../structural/nav.php"; ?> <div class="contentDiv"> <?php require "../getAllCards.php"; getAllCards("all"); //all print all cards //read print all read cards //unread print all unread cards ?> </div> </body> </html> <script> $(document).ready(function(){ $('#readLnk').click(function(e){ e.preventDefault(); $('.contentDiv a').css('color', 'DarkSlateGray'); $(this).css('color', 'DarkRed');
changePassword(); } if ($function == "get_all_addresses") { getAllAddresses(); } if ($function == "get_address") { getAddress(); } if ($function == "update_address") { updateAddress(); } if ($function == "add_address") { addAddress(); } if ($function == "get_all_cards") { getAllCards(); } if ($function == "get_card") { getCard(); } if ($function == "add_credit_card") { addCreditCard(); } if ($function == "add_credit_card_checkout") { addCreditCardCheckout(); } if ($function == "remove_credit_card") { removeCreditCard(); } if ($function == "get_cart") { getCart();