这是我的code
- <?php
- if(isset($_POST["email"]))
- {
- $user = $_POST["id"];
- $emailCheck = $_POST["email"];
-
- $email = $_POST["email"];
- if(filter_var($email, FILTER_VALIDATE_EMAIL))
- {
- echo 'Correct';
- } else
- {
- echo 'Incorrect';
- die;
- }
- if($user !== $email){
- echo '<br> Invalid Email for user : '.$user;
- }else{
- echo '<br>Your Entered Correct ID : '.$user.' and '.$email;
- }
- }
- ?>
- <form action="" method="post">
- ID: <input type="text" name="id">
- Email: <input type="text" name="email">
- <input type="submit" value="Check email">
- </form>