How can i check if user entering correct form of email
- by deerox
Well i am not using email verification so i am facing problem in checking correct form of email address
suppose if user enter support or support@ it accept it as well.
So i atleast want them to enter there email or at least they enter email form correctly
Here is my code:
<?php
require_once 'global.php';
if (!isset($_SESSION['logged_in'])) {
header("Location: login.php");
}
$user = unserialize($_SESSION['user']);
$email = $user->email;
$message = "";
if (isset($_POST['submit-settings'])) {
$email = $_POST['email'];
$user->email = $email;
$user->save();
$msg = "Done!<br/>";
}
?>