<?php $email = $_POST['email']; $id = $_GET['tid']; $hasAt = false; $hasDot = false; if ($email[$i] == '@') $hasAt = true; if ($email[$i]== '.') $hasDot = true; } if ($hasAt && $hasDot) { $q = mysqli_query($con, "SELECT * FROM `subscriptions` WHERE `email`='$email' AND `threadID`='$id'"); if ($qu) { echo 'Successfully Subscribed.'; }else echo 'Failed to subscribe to the given thread ID with the given email.'; }else echo 'The given email is already subscribed to that thread ID!'; } } ?>
$msg = 'A new reply has been submitted to a thread you have subscribed to. '.$user.' had this to say:<br/>'.$cont; } }