<?php $emailErr = "" ; $email = "" ; $error = 0 ; if ($_SERVER ["REQUEST_METHOD"] == "POST") { if (empty($_POST["email"] ) ) { $emailErr = "email is required" ; $errors = 1 ; } else { $email = test_input ($_POST["email"] ) ; if ( !filter_var ($email, FILTER_VALIDATE_EMAIL) ) { $emailErr = "invalid email format" ; $errors = 1 ; } } function test_input ($data) { $data = trim($data) ; $data = stripslashes ($data) ; $data = htmlspecialchars ($data) ; return $data ; } ?> <title> my website <h1 align=" center "> Login </h1> " > EMAIL ID <span class="error">*<?php echo $emaiErr ; ?> </span> <br> PASSWORD <br> <br> <?php if ( isset ( $_POST[ 'submit' ] ) && (errors == 0) ) { echo "<h2> Form submitted successfully.</h2>" ; } ?>
<title>
" >
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)