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