Professional Documents
Culture Documents
Information Security
Information Security
Information Security
&
JOE SEMAAN
INFORMATION SECURITY
WHAT IS INFORMATION SECURITY?
Information confidentiality, integrity, and availability are all protected. Other qualities, such as
authenticity, accountability, non-repudiation, and reliability, may also be relevant.
To provide confidentiality, integrity, and availability, information and information systems must
be protected from unauthorized access, use, disclosure, disruption, alteration, or destruction.
When necessary, ensures that only authorized users (confidentiality) have access to accurate and
complete data (integrity) (availability).
The process of safeguarding an organization's intellectual property is known as information
security.
A well-informed feeling of security that information dangers and controls are in check.
DEFINITION LOGIN PAGE
// LOGIN USER
if (isset($_POST['login_user'])) {
$username = mysqli_real_escape_string($db, $_POST['username']);
$password = mysqli_real_escape_string($db, $_POST['password']);
if (empty($username)) {
array_push($errors, "Username is required");
}
if (empty($password)) {
array_push($errors, "Password is required");
}
IF THE LOGIN IS NOT CORRECT
It will give you that the username or password
combination is incorrect by using an php error page.
// REGISTER USER
if (isset($_POST['reg_user'])) {
// receive all input values from the form
$username = mysqli_real_escape_string($db, $_POST['username']);
$email = mysqli_real_escape_string($db, $_POST['email']);
$password_1 = mysqli_real_escape_string($db,
$_POST['password_1']);
$password_2 = mysqli_real_escape_string($db,
$_POST['password_2']);
REGISTER USER IF THERE ARE NO ERRORS IN THE FORM
if (count($errors) == 0) {
$password = md5($password);
$query = "SELECT * FROM users WHERE username='$username' AND password='$password'";
$results = mysqli_query($db, $query);
if (mysqli_num_rows($results) == 1) {
$_SESSION['username'] = $username;
$_SESSION['success'] = "You are now logged in";
header('location: index.php');
}else {
array_push($errors, "Wrong username/password combination");
IF THE LOGIN IS CORRECT
Here we can add a username and email and // connect to the database
password by just go to register. php page and add $db = mysqli_connect('localhost', 'root',
to the database and it will be encrypted password "" , 'login page');
THE END