Commit 696728ea authored by Tanmim Hanifa's avatar Tanmim Hanifa

Removed redundant files

parent 098dc6c8
<?php
$con = mysqli_connect("localhost", "jsusz001", "password", "jsusz001_TravelPals");
$username = $_POST["username"];
$password = $_POST["password"];
$statement = mysqli_prepare($con, "SELECT * FROM user WHERE username = ? AND password = ?");
mysqli_stmt_bind_param($statement, "ss", $username, $password);
mysqli_stmt_execute($statement);
mysqli_stmt_store_result($statement);
mysqli_stmt_bind_result($statement, $id, $name, $dob, $password, $picture, $email, $location, $username);
$response = array();
$response["success"] = false;
while(mysqli_stmt_fetch($statement)){
$response["success"] = true;
$response["name"] = $name;
$response["dob"] = $dob;
$response["password"] = $password;
$response["picture"] = $picture;
$response["email"] = $email;
$response["location"] = $location;
$response["username"] = $username;
}
echo json_encode($response);
;?>
\ No newline at end of file
<?php
$con = mysqli_connect("localhost", "jsusz001", "password", "jsusz001_TravelPals");
$name = $_POST["name"];
$dob = $_POST["dob"];
$password = $_POST["password"];
$picture = $_POST["picture"];
$email = $_POST["email"];
$location = $_POST["location"];
$username = $_POST["username"];
$statement = mysqli_prepare($con, "INSERT INTO user (name, dob, password, picture, email, location, username) VALUES (?, ?, ?, ?)");
mysqli_stmt_bind_param($statement, "siss", $name, $dob, $password, $picture, $email, $location, $username);
mysqli_stmt_execute($statement);
$response = array();
$response["success"] = true;
echo json_encode($response);
?>
Markdown is supported
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