echo ' <form class="subscribe-form subscriber-login-form"> <!--<h2>' . $form_headline . '</h2>--> ' . $response . ' ' . $form_inputs . ' </form>'; } elseif (isset($_POST) && $_GET['origin'] != 'create-account') { $subscriber = $_POST; $subscriber['email'] = strtolower(trim($_POST['email'])); include ROOT . 'inc/connection.php'; $result = mysqli_query($con, "SELECT * FROM `user_subscribers` WHERE `email` LIKE CONVERT( _utf8 '%" . $subscriber['email'] . "%' USING latin1 ) COLLATE latin1_swedish_ci ORDER BY `id` DESC LIMIT 0 , 30"); if ($row = mysqli_fetch_assoc($result)) { $config = new User(); //$user_posts = count($config->findPostsByUser($subscriber['email'])); //print_r($subscriber); $user_active = $config->checkIfUserActive($subscriber['email']); $details = ''; $details .= 'You are now Logged-in,'; if ($user_active == 0) { $details .= ' but your TRIAL has expired & you haven\'t subscribed to this month\'s Magazine! You\'ll need to reactivate your account to continue!'; $details .= '<br></br><button class="btn btn-lg btn-success create-account-button" >Upgrade Your Account</button>'; } elseif ($user_active == 1) { //$details = 'We have sent you an email containing all information about your RSVP to this event!'; $details = '<p>You will be redirected to PayPal to purchase your tickets!</p>'; $details .= '<br><a href="' . $_POST['event_id'] . '" target="_blank" class="btn btn-lg btn-warning create-accxount-button" >Go To PayPal</a>'; $config->sendMail($subscriber['email'], 'event-rsvp'); } echo '' . $form_headline . ' '; echo '<p>' . $details . '</p>'; } else { $config = new User();