<?php
class Email
{
protected $email;
public function Email()
{
$email = 'karenshahmuradyan@gmail.com';
if (isset($_POST['loginbutton'])) {
if ($_POST['email'] == $email) {
$_SESSION['email'] = $this->email;
echo $this->email;
}else{
echo "error";
}
}
}
}
$email = new Email();
?>
<form action="" method="post">
<input type="text" name="email" placeholder="email" required autofocus>
</br></br>
<button type="submit" name="loginbutton">Email
</button>
</form>