How can i check if user entering correct form of email
Posted
by
deerox
on Stack Overflow
See other posts from Stack Overflow
or by deerox
Published on 2012-10-14T15:33:08Z
Indexed on
2012/10/14
15:36 UTC
Read the original article
Hit count: 144
php
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/>";
}
?>
© Stack Overflow or respective owner