Skip to content
Snippets Groups Projects
Commit 929de231 authored by Azka Nabilah Mumtaz's avatar Azka Nabilah Mumtaz
Browse files

A little change on register:

parent 4ed167e3
No related merge requests found
Pipeline #6891 failed with stages
...@@ -56,5 +56,7 @@ ...@@ -56,5 +56,7 @@
</div> </div>
</div> </div>
<!-- <script src="js/main.js"></script> --> <!-- <script src="js/main.js"></script> -->
<script type="">
document.cookie="state=home";
</script>
</div> </div>
\ No newline at end of file
...@@ -20,10 +20,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST'){ ...@@ -20,10 +20,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST'){
$registmt->fetch(); $registmt->fetch();
if(!is_null($user)) { if(!is_null($user)) {
header("Location: admin");
echo '<script language="javascript">'; echo '<script language="javascript">';
echo 'alert("Username has already taken")'; echo 'alert("Username has already taken")';
echo '</script>'; echo '</script>';
header("Location: admin/register.html");
die(); die();
//exit(); //exit();
} else { } else {
...@@ -31,7 +31,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST'){ ...@@ -31,7 +31,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST'){
$stmt->bind_param("sss", $username, $password, $name); $stmt->bind_param("sss", $username, $password, $name);
$stmt->execute(); $stmt->execute();
$stmt->close(); $stmt->close();
header("Location: admin/home.html"); header("Location: admin/");
die(); die();
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment