echo $styleInvalid; } ?> /> <span class="formcheck" id="spanPhoneNum"> </span><br /> <label>Birthday:</label> <input type="date" name="DOB" size="30" placeholder="mm/dm/yyyy" value="<?php if (isset($_POST['DOB'])) { echo $dob; } ?> " id="dob" <?php if (!validateDOB($dob)) { echo $styleInvalid; } ?> /><br /> <label>Email:</label> <input type="text" name="EMAIL" size="30" id="email" class="validates" placeholder="*****@*****.**" onkeyup="emailValid()" value="<?php if (isset($_POST['EMAIL'])) { echo $email; } ?> " <?php
<?php include 'includes/functions/db.php'; include 'includes/functions/formControls.php'; include 'includes/accountSessions.php'; $errors = array(); $loginId = $_SESSION['idLogin']; if (isset($_POST['submit'])) { require 'includes/functions/validate.php'; validateEmail($errors, $_POST, 'email'); validateText($errors, $_POST, 'firstName'); validateText($errors, $_POST, 'lastName'); validateDOB($errors, $_POST, 'DOB'); validateText($errors, $_POST, 'password'); if (!$errors) { $isMale = NULL; if (isset($_POST['gender']) && $_POST['gender'] == 'male') { $isMale = 1; } else { $isMale = 0; } db_updateOwner($loginId, $_POST['email'], $_POST['password'], $_POST['firstName'], $_POST['lastName'], $_POST['DOB'], $isMale); header("location: http://{$_SERVER['HTTP_HOST']}/property-Management-application/ownerProfile.php"); exit; } } ?> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge">