}
    ?>
        <?php 
    if ($formIsValid) {
        ?>
            <?php 
        $repo = new \pnaika\finals\SqliteRepository();
        $customerDetails = new \pnaika\finals\Customer();
        $customerDetails->setCustomerName($customerName);
        $hashPassword = password_hash($password, PASSWORD_DEFAULT);
        $customerDetails->setPassword($hashPassword);
        $customerDetails->setAddress($address);
        $customerDetails->setEmail($email);
        $customerDetails->setPhoneNumber($phoneNumber);
        $customerDetails->setLastUpdate($time);
        $repo->saveCustomer($customerDetails);
        ?>
            <header></header>

            <div class="alert alert-success" role="alert">
                <h2>CUSTOMER PROFILE GOT CREATED!</h2>
                <h5>CUSTOMER SHOULD USE NEWLY CREATED USERNAME AND PASSWORD TO LOGIN :) </h5>
            </div>

        <?php 
    } else {
        ?>
            <header>CREATE NEW USER</header>
            <form action="custSignUp.php" method="POST" id="loginForm">
                <div class="form-group">
                    <label for="cName">FULL NAME/USER NAME</label>
     $passwordErr = '<span style="color: #f00;">PASSWORD IS MANDATORY!</span>';
 }
 ?>
 <?php 
 if ($formIsValid) {
     ?>
      <?php 
     $customer = $repo->getCustomerById($_POST['custId']);
     $customer->setCustomerName($customerName);
     $hashPassword = password_hash($password, PASSWORD_DEFAULT);
     $customer->setPassword($hashPassword);
     $customer->setAddress($address);
     $customer->setEmail($email);
     $customer->setPhoneNumber($phoneNumber);
     $customer->setLastUpdate($time);
     $repo->saveCustomer($customer);
     ?>
     <!doctype html>
     <html lang="en">
     <head>
         <meta charset="UTF-8">
         <title>UPDATE CUSTOMER PROFILE</title>
         <link rel="stylesheet" href="../style/style.css">
         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
         <link href='http://fonts.googleapis.com/css?family=Lora:400,700' rel='stylesheet' type='text/css'/>
         <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"/>
         <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css"/>
         <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"/>
     </head>
     <body>
     <a href="#"><img class="logo" src="../images/logo/gpsLogo.jpg" alt="CCS" title="GLOBAL PARKING SYSTEM"></a>