Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (!empty($_POST['email']) & !empty($_POST['password'])) {
- $xml = simplexml_load_file("db/db.xml");
- $postuser = $_POST['email'];
- $postpassword = $_POST['password'];
- foreach ($xml->user as $id) {
- $email[] = $id->email;$pass[] = $id->pass;
- $fname[] = $id->fname;$lname[] = $id->lname;
- $zip[] = $id->zip;$address[] = $id->address;
- $hometype[] = $id->hometype;$bedrooms[] = $id->bedrooms;
- $bathrooms[] = $id->bathrooms;$livingrooms[] = $id->livingrooms;
- $kitchens[] = $id->kitchens;$sqfoot[] = $id->sqfoot;
- }
- if (in_array($postuser, $email)) {
- $key = array_search($postuser, $email);
- if ($postpassword == $pass[$key]) {
- echo "password correct";
- }
- else { echo "wrong password"; }
- }
- else { echo "error, no user found"; }
- }
- else { echo "please log in"; }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement