Skip to content
Snippets Groups Projects
Commit 5f99589b authored by Girvandi Ilyas's avatar Girvandi Ilyas
Browse files

minor change on edit profile n register

parent 9c92c95a
1 merge request!42Projekers - 13515051 - Girvandi Ilyas
<?php
//TODO : Setelah submit redirect ke dashboard dengan variable ?id=..., check semua input type gaboleh salah
//model
include "../model/user.php";
......@@ -46,7 +45,6 @@ if(isset($_POST["register"])) {
$isDriver = 1;
}
}
$user -> createUser($name,$username,$email,$password,$phone,$isDriver);
$id = 0;
$result = $user->getIdByUser($username);
......
......@@ -10,11 +10,10 @@
display: inline-block;
width: 100%;
text-align: center;
font-size: 300%;
font-size: 350%;
vertical-align: middle;
color: #008800;
color: #02702C;
font-weight: bold;
font-family: Arial;
}
.line {
......
......@@ -43,7 +43,7 @@ function checkAllInput() {
return false;
}
if(regex.test(phone.value) === false) {
alert("Phone number must be valid");
alert("Phone number must be valid (08..)");
return false;
}
}
......
<html>
<head>
<title>Edit-profile</title>
<link href="../css/primary.css" type="text/css" rel="stylesheet">
<link href="../css/edit-profile.css" type="text/css" rel="stylesheet">
<script>
var sessionid = "<?php echo $_GET['id'];?>";
</script>
<script src="../js/edit-profile.js"></script>
</head>
<body onload="getUserProfile();" onreset="getUserProfile()" onpageshow="getUserProfile()">
<div class="container">
<h1>EDIT PROFILE INFORMATION</h1>
<form enctype="multipart/form-data" action="../controller/edit-profile.php?id=<?php echo $_GET['id']?>"
method="post" id="form" name="editForm" onsubmit="return checkAllInput()">
<input type="hidden" id="userid" value="<?php echo $_GET['id'];?>">
<div class="edit-image">
<div class="div-profile-image">
<img class="profile-image" id="image">
</div>
<div class="browse-image">
<label>Update profile picture</label>
<br />
<br />
<input type="file" name="image-file" value="browse.." id="image-file">
</div>
<title>Edit-profile</title>
<link href="../css/primary.css" type="text/css" rel="stylesheet">
<link href="../css/edit-profile.css" type="text/css" rel="stylesheet">
<script>
var sessionid = "<?php echo $_GET['id'];?>";
</script>
<script src="../js/edit-profile.js"></script>
</head>
<body onload="getUserProfile();" onreset="getUserProfile()" onpageshow="getUserProfile()">
<div class="container">
<h1>EDIT PROFILE INFORMATION</h1>
<form enctype="multipart/form-data" action="../controller/edit-profile.php?id=<?php echo $_GET['id']?>"
method="post" id="form" name="editForm" onsubmit="return checkAllInput()">
<input type="hidden" id="userid" value="<?php echo $_GET['id'];?>">
<div class="edit-image">
<div class="div-profile-image">
<img class="profile-image" id="image">
</div>
<div class="browse-image">
<label>Update profile picture</label>
<br />
<br />
<input type="file" name="image-file" value="browse.." id="image-file">
</div>
</div>
<div>
<div class="edit-data">
<label class="form-label">Your Name</label>
<input type="text" name="name" id="name">
</div>
<div class="edit-data">
<label class="form-label">Phone</label>
<input type="text" name="phone" id="phone">
</div>
<div class="edit-data">
<label class="form-label">Status Driver</label>
<div class="checkbox">
<label class="switch">
<input type="checkbox" name="driver" id="driver">
<span class="slider"></span>
</label>
</div>
<div>
<div class="edit-data">
<label class="form-label">Your Name</label>
<input type="text" name="name" id="name">
</div>
<div class="edit-data">
<label class="form-label">Phone</label>
<input type="text" name="phone" id="phone">
</div>
<div class="edit-data">
<label class="form-label">Status Driver</label>
<div class="checkbox">
<label class="switch">
<input type="checkbox" name="driver" id="driver">
<span class="slider"></span>
</label>
</div>
</div>
</div>
<div>
<div>
<a class="back" href="dashboard.php?id=<?php echo $_GET['id'];?>">BACK</a>
<input type="submit" value="SAVE" class="save" name="submit">
</div>
</div>
</div>
</div>
<div>
<div>
<a class="back" href="dashboard.php?id=<?php echo $_GET['id'];?>">BACK</a>
<input type="submit" value="SAVE" class="save" name="submit">
</div>
</div>
</form>
</div>
</body>
......
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