Last active
July 22, 2018 23:04
-
-
Save sweeneyapps/440bedc4721a0f98b487eec9d8f50edf to your computer and use it in GitHub Desktop.
Some debugging...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include_once "dbconnect.php"; | |
$name = $username = $email = $pass = $phone = $final = ""; | |
if(isset($_POST['btn-signup'])) { | |
$name = $_POST['name']; | |
$username = $_POST['username']; | |
$email = $_POST['email']; | |
$pass = $_POST['pass']; | |
$phone = $_POST['phone']; | |
$query = "INSERT INTO accounts(fullname, username, email, password, mobileno) VALUES ('$name', | |
'$username', '$email', '$pass', '$phone')"; | |
$res = mysqli_query($link, $query); | |
if($res) { | |
//header("Location: fcmain.php"); | |
$final = "sign up successful"; | |
unset($name); | |
unset($username); | |
unset($email); | |
unset($pass); | |
unset($phone); | |
} | |
} | |
?> | |
<!DOCTYPE> | |
<html lang='en'> | |
<head> | |
<title>FC</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> | |
</script> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> | |
</head> | |
<body> | |
<form method="POST" action="<?php htmlspecialchars($_SERVER['PHP_SELF']); ?>" autocomplete="off"> | |
<input type="text" name="name" placeholder="name"><br> | |
<input type="text" name="username" placeholder="username"><br> | |
<input type="email" name="email" placeholder="email"><br> | |
<input type="password" name="pass" placeholder="pass"> <br> | |
<input type="tel" name="phone" placeholder="phone"><br> | |
<button type="submit" name="btn-signup">click</button> <br> | |
<p> <?php echo $final; ?> </p> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment