-
Notifications
You must be signed in to change notification settings - Fork 0
/
signup.php
33 lines (26 loc) · 1.5 KB
/
signup.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
include "inc/head.php";
if(isset($_SESSION['user_data'])){
header("Location: index.php?msg=already-logged");
}
?>
<section class="login">
<?php
// Error bar include
include "inc/error-bar.php";
?>
<form action="inc/action.php" method="post">
<h2>Signup</h2>
<div class="item">
<input type="text" name="firstname" placeholder="First Name" required autocomplete="off" <?php if(isset($_SESSION['signup_data'])){echo "value='" .$_SESSION['signup_data']['firstname'] . "'";}?>>
<input type="text" name="lastname" placeholder="Last Name" required autocomplete="off" <?php if(isset($_SESSION['signup_data'])){echo "value='" .$_SESSION['signup_data']['lastname'] . "'";}?>>
<input type="email" name="email" placeholder="Email" required autocomplete="off" <?php if(isset($_SESSION['signup_data'])){echo "value='" .$_SESSION['signup_data']['email'] . "'";}?>>
<input type="tel" name="phone" placeholder="Phone Number" required autocomplete="off" <?php if(isset($_SESSION['signup_data'])){echo "value='" .$_SESSION['signup_data']['phone'] . "'";}?>>
<input type="text" name="username" placeholder="Username" required autocomplete="off" <?php if(isset($_SESSION['signup_data'])){echo "value='" .$_SESSION['signup_data']['username'] . "'";}?>>
<input type="password" name="password" placeholder="Password" required autocomplete="off">
</div>
<button type="submit" name="signup">Signup</button>
</form>
</section>
<?php
?>