Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Pedro Branco
TravelBuddy
Commits
696728ea
Commit
696728ea
authored
Mar 01, 2017
by
Tanmim Hanifa
Browse files
Removed redundant files
parent
098dc6c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
PHP/backphp/Login.php
deleted
100644 → 0
View file @
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/backphp/Register.php
deleted
100644 → 0
View file @
098dc6c8
<?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
);
?>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment