session_start();
if(!isset($_SESSION['userid'])){
header("location:signup/login.php");//if session is not registered takes you back to index.php
}
include '../../form/connect.php';
//////////////////////////////
if ($_POST['submit'] == "Delete User")
{
$userid = $_POST['userid'];
$result = mysqli_query($sql,"DELETE from plus_signup WHERE userid='$userid'")
or die(mysqli_error());
$del_message = "
This is for access to the New PC Affidavit System.
Your Account has been created and ready for you to finish the setup process
Please Click Here to finish and gain access to your account.
If you have any problems please contact Patsy Winchester";
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'From: Weber County Sheriff' . "\r\n";
$headers .= 'Reply-To: webmaster@co.weber.ut.us' . "\r\n";
// Mail it
if(mail($to,$subject,$message,$headers)) {
$mail_sent = "
Notification Email has been sent to $email. They can follow the link provided in their email to add a Security Question and Password.