User $userid has been deleted"; } if ($_POST['submit'] == "Add New Account") { $userid = $_POST['userid']; $name = $_POST['name']; $email = $_POST['email']; //$sec = $_POST['sec']; $access = $_POST['access']; $level = $_POST['level']; mysqli_query($sql,"INSERT INTO plus_signup(userid, name, email, access, level) VALUES('$userid', '$name', '$email', '$access', '$level' ) ") or die(mysqli_error()); $to = "$email" . ', '; // note the comma $to .= 'jstimpson@co.weber.ut.us' . ', '; $subject = 'Electronic PC Affidavit System'; $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.

"; } else { $mail_sent = "Email Not Sent"; } $msg = "
Account $userid/$name has been Added
"; $_POST['submit'] = "Search\Add"; } if ($_POST['submit'] == "Update Account") { $userid = $_POST['userid']; $name = $_POST['name']; $email = $_POST['email']; $sec = $_POST['sec']; $access = $_POST['access']; $level = $_POST['level']; // Insert a row of information into the table "example" $result = mysqli_query($sql,"UPDATE plus_signup SET name='$name', email='$email', sec='$sec', access='$access', level='$level' WHERE userid='$userid'") or die(mysqli_error()); $msg = "
Account $userid has been updated

"; $_POST['submit'] = "Search\Add"; } ?> Sheriff Employee Section
Search/Add User by :
User ID Name Email Security Question Access Security Level

Notice: Undefined variable: userid in /var/www/localhost/htdocs/sheriff/online_sheriff/signup/admin.php on line 223
Notice: Undefined variable: dis in /var/www/localhost/htdocs/sheriff/online_sheriff/signup/admin.php on line 226
>