if ($_POST['userid'] == "")
{
$userid = $_GET['userid'];
}else
{
$userid = $_POST['userid'];
}
//session_start(userid);
//$account = $_GET['account'];
//$userid = $_SESSION['userid'];
//if(!session_is_registered(userid)){
//header("location:signup/login.php");//if session is not registered takes you back to index.php
//}
include '../../form/connect.php';
include '../../../erroroff.php';
//////////////////////////////
if ($_POST['userid'] == "")
{
$userid = $_GET['userid'];
}else
{
$userid = $_POST['userid'];
}
$result = mysql_query($sql,"SELECT * FROM plus_signup WHERE userid = '$userid'")
or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
$userid = $row['userid'];
$name = $row['name'];
$email = $row['email'];
$sec = $row['sec'];
$access = $row['access'];
$level = $row['level'];
if($_POST['submit'] == "Create Account")
{
$userid = $_POST['userid'];
$password = $_POST['password'];
$password2 = $_POST['password2'];
$email = $_POST['email'];
$name = $_POST['name'];
$sec = $_POST['sec'];
$status = "OK";
$msg="";
// if userid is less than 3 char then status is not ok
if ($level == 1 || $level == 2)
{
$site = "https://www.co.weber.ut.us/sheriff/online_sheriff/signup/login.php";
}elseif ($level == 3 || $level == 4 || $level == 5 || $level == 6)
{
$site = "https://www.co.weber.ut.us/sheriff/form";
}
if ( strlen($password) < 3 ){
$msg="Password must be more than 3 char long
";
echo $msg;
$status= "NOTOK";}
if ( $password <> $password2 ){
$msg="Both passwords are not matching
";
echo $msg;
$status= "NOTOK";}
if($status<>"OK"){
echo "$msg
";
}else{ // if all validations are passed.
$password = sha1($_POST['password']);
$result = mysql_query($sql,"UPDATE plus_signup SET password='$password', sec='$sec' WHERE userid='$userid'")
or die(mysql_error());
echo "
User ID | Name | Security Question Place of Birth? |
password | password Confirm |
---|