Included dbh and signup file
This commit is contained in:
parent
5fb868c90d
commit
e3a2b8a495
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
<!-- Connection to the Server -->
|
||||
$conn = mysqli_connect("localhost:4022", "root", "password", "login");
|
||||
<!-- Connection to the Server end -->
|
||||
|
||||
if (!$conn){
|
||||
die("Connection failed:".mysqli_connect_error());
|
||||
}
|
||||
?>
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
INCLUDE 'dbh.php';
|
||||
|
||||
$first = $_POST['first'];
|
||||
$last = $_POST ['last'];
|
||||
$uid = $_POST['uid'];
|
||||
$pwd = $_POST['pwd'];
|
||||
|
||||
$sql = "Insert into user (first, last, uid, pwd)
|
||||
VALUES ('$first', '$last' )";
|
||||
$result = $mysqli_query($conn, $sql);
|
||||
|
||||
header("Location: index.php");
|
||||
|
||||
?>
|
Loading…
Reference in New Issue