diff --git a/functions.php b/functions.php deleted file mode 100644 index f9147d5..0000000 --- a/functions.php +++ /dev/null @@ -1,55 +0,0 @@ - -

Username/password is incorrect.

-
Click here to Login"; - } - } -} -// If form submitted, insert values into the database. -function register() -{ - if (isset($_REQUEST['username'])) { - // removes backslashes - $username = stripslashes($_REQUEST['username']); - //escapes special characters in a string - $username = mysqli_real_escape_string($db_connection,$username); - $email = stripslashes($_REQUEST['email']); - $email = mysqli_real_escape_string($db_connection,$email); - $password = stripslashes($_REQUEST['password']); - $password = mysqli_real_escape_string($db_connection,$password); - $trn_date = date("Y-m-d H:i:s"); - $query = "INSERT into `users` (username, password, email, trn_date) - VALUES ('$username', '".md5($password)."', - '$email', '$trn_date')"; - $result = mysqli_query($db_connection,$query); - if ($result) { - echo "
-

You are registered successfully.

-
Click here to Login
"; - } -} -} -?> diff --git a/index.php b/index.php index f745aa5..5787afa 100644 --- a/index.php +++ b/index.php @@ -1,7 +1,3 @@ - @@ -25,6 +21,9 @@ login(); +

Not registered yet? Register Here