$user_info->bindParam(':fullName', $fullName);
            $user_info->bindParam(':contactNumber', $contactNumber);
            $user_info->bindParam(':emailAddress', $emailAddress);
            $user_info->bindParam(':password', $hashPassword);
            $user_info->bindParam(':nationalIDNumber', $nationalIDNumber);
            $user_info->bindParam(':dateOfBirth', $dateOfBirth);
            $user_info->execute();
            $reporter_info = $pdo->prepare("INSERT INTO reporter_info (Reporter_ID, Occupation, Designation, Contact_Address)\n\t\t\t\tVALUES (:reporterID, :occupation, :designation, :contactAddress)");
            $User_ID = $pdo->lastInsertId();
            $_SESSION['User_ID'] = $User_ID;
            $reporter_info->bindParam(':reporterID', $User_ID);
            $reporter_info->bindParam(':occupation', $occupation);
            $reporter_info->bindParam(':designation', $designation);
            $reporter_info->bindParam(':contactAddress', $contactAddress);
            $reporter_info->execute();
            CentralDatabase::disconnect();
            header("Location: personalInfoForm.php?registered");
        }
    } catch (PDOException $e) {
        echo "Error: " . $e->getMessage();
    }
}
?>

<!DOCTYPE html>
<html lang="en">
	<head>
		<title>
			Personal Information
		</title>
		<meta charset="utf-8">
Esempio n. 2
0
 public static function disconnect()
 {
     self::$conn = null;
 }