<?php
class Email
{
protected $email;
public function Email()
{
$this->email = 'karenshahmuradyan@gmail.com';
if (isset($_POST['loginbutton'])) {
if ($_POST['email'] == $this->email) {
$_SESSION['email'] = $this->email;
echo $this->email;
}else{
echo "error";
}
}
}
}
$email = new Email();
?>
<?php
class LicenseKey extends Email
{
protected $getemail;
public function LicenseKey()
{
$licensekey = 'licensekey';
$this->Email();
$this->getemail = $_SESSION['email'];
if (isset($_POST['licensebutton'])) {
if ($_POST['license'] == $licensekey) {
echo $this->getemail;
}
}
}
}
$licensekey = new LicenseKey();
?>
<?php
$count = 0;
if ($count == 0) {
echo('<form class="form-signin" role="form"
action="" method="post">
<h4 class="form-signin-heading"></h4>
<input type="text" class="form-control"
name="email" placeholder="email"
required autofocus>
</br></br>
<button class="btn btn-lg btn-primary btn-block" type="submit"
name="login">Post
</button>
</form>');
}
if (isset($_POST['login'])) {
$count++;
}
if ($count == 1) {
echo('
<input type="test" class="form-control"
name="activation" placeholder="License key" required>
</br></br>
');
}
?>