From a90ecdf67bbe479825f8ac11ac1857aaeed32cbb Mon Sep 17 00:00:00 2001 From: "Rhalp Darren R. Cabrera" Date: Tue, 14 May 2019 05:02:40 +0800 Subject: [PATCH] initial commit --- .gitattributes | 2 - authentication.php | 97 +++++++++++++++++++++++++++++++++++++++++++--- data-register.php | 77 ++++++++++++++++++++++++++++++++++++ 3 files changed, 169 insertions(+), 7 deletions(-) delete mode 100644 .gitattributes create mode 100644 data-register.php diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index dfe0770..0000000 --- a/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto diff --git a/authentication.php b/authentication.php index aefaf31..243d6d2 100644 --- a/authentication.php +++ b/authentication.php @@ -27,12 +27,13 @@
- +
+ +
+

© CVSU Main Indang - Saka, All rights reserved

- +
@@ -65,7 +114,8 @@ include('x-script.php'); ?> diff --git a/data-register.php b/data-register.php new file mode 100644 index 0000000..16c39cd --- /dev/null +++ b/data-register.php @@ -0,0 +1,77 @@ + 0) { + $output['error'] = 'Username already used'; + + } + else { + $sql = "INSERT INTO `user` ( + `user_ID`, + `lvl_ID`, + `user_img`, + `user_Fullname`, + `user_Name`, + `user_Pass`, + `user_Email`, + `user_Address`, + `user_Registered`) + VALUES ( + NULL, + 1, + NULL, + '$acc_name', + '$acc_username', + '$newpass', + '$acc_email', + '$acc_address', + CURRENT_TIMESTAMP);"; + + if ($result = mysqli_query($conn, $sql)) { + $output['success'] = 'Successfully Register'; + } + else{ + $output['error'] = 'Failed to Register'; + } + + } + + } + echo json_encode($output,true); +?> \ No newline at end of file