diff --git a/Course.php b/Course.php
index 4964d1a..5485be5 100644
--- a/Course.php
+++ b/Course.php
@@ -1,4 +1,3 @@
-
";
@@ -108,7 +105,7 @@ New Date/Time
";
}
-// ------------------------------Editing Lab Assignment by Lecture------------------------------------
+// ------------------------------Editing Lab Assignment by Lecturer ------------------------------------
if($_GET['act']=="edit"){
@@ -117,41 +114,42 @@ New Date/Time
query($sql) === TRUE) {
- $_SESSION["info_Updated"]="Information Updated Successfull";
+ $_SESSION["info_Updated"]="Assignment information updated successfully.";
} else {
- echo "Error: " . $sql . "
" . $con->error;
+ // echo "Error: " . $sql . "
" . $con->error;
+ echo "Serious error happened whiling updating assignment information.";
}
}
+
if( $_SESSION['user_type']=="Lecturer"){
- $Date=$_SESSION['Date'];
- $Time=$_SESSION['Time'];
- $Instructions=$_SESSION['Instructions'];
- $Title=$_SESSION['Title'];
- $Marks=$_SESSION['Marks'];
-
+ $Date = $_SESSION['Date'];
+ $Time = $_SESSION['Time'];
+ $Instructions = $_SESSION['Instructions'];
+ $Title = $_SESSION['Title'];
+ $Marks = $_SESSION['Marks'];
+ $Type = $_SESSION['Type'];
+
echo "
";
?>
diff --git a/Script.php b/Script.php
index 144729a..84b568c 100644
--- a/Script.php
+++ b/Script.php
@@ -105,9 +105,12 @@ if (!empty($_POST["frm_signup_1"])) {
$_SESSION['user_fullname'] = $fullname;
$_SESSION['user_type'] = "Student";
$_SESSION['user_email'] = $email;
+
// check confirmed password
if ( strcasecmp( $password, $confirmpassword ) != 0 ){
$_SESSION['info_signup2']="Password confirmation failed.";
+ $_SESSION['user_fullname'] = null;
+ $_SESSION['user_type'] = null;
header("Location: signup.php");
return;
}
@@ -119,15 +122,15 @@ if (!empty($_POST["frm_signup_1"])) {
return;
}
- $upperLetter = preg_match('@[A-Z]@', $password);
- $smallLetter = preg_match('@[a-z]@', $password);
+ $upperLetter = preg_match('@[A-Z]@', $password);
+ $smallLetter = preg_match('@[a-z]@', $password);
$containsDigit = preg_match('@[0-9]@', $password);
$containsSpecial = preg_match('@[^\w]@', $password);
$containsAll = $upperLetter && $smallLetter && $containsDigit && $containsSpecial;
// check for strong password
- if($containsAll < 8) {
- $_SESSION['info_signup2']="Password must have at least characters that include letters, numbers and sepcial characters.";
+ if(! $containsAll) {
+ $_SESSION['info_signup2'] = "Password must have at least characters that include lowercase letters, uppercase letters, numbers and sepcial characters (e.g., !?.,*^).";
header("Location: signup.php");
return;
}
@@ -136,7 +139,9 @@ if (!empty($_POST["frm_signup_1"])) {
"SELECT * FROM Users_Table WHERE email='$email'");
if(mysqli_num_rows($result)!=0)
{
- $_SESSION["info_signup2"]="Email adress : ".$email." already in use.";
+ $_SESSION["info_signup2"]="Email adress ".$email." already in use.";
+ $_SESSION['user_fullname'] = null;
+ $_SESSION['user_type'] = null;
header("Location: signup.php");
return;
}
diff --git a/index.php b/index.php
index bc59142..72594c3 100644
--- a/index.php
+++ b/index.php
@@ -35,10 +35,10 @@ session_start();