Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "mysql.hostinger.in";
- $username = "u604844745_stef";
- $password = "testing123";
- $conn = mysql_connect($servername, $username, $password)
- or die("Unable to connect to MySQL");
- echo "Connected to MySQL<br>";
- $email = $_GET['email'];
- $sqldata = mysql_query("SELECT * FROM u604844745_masu.users WHERE u604844745_masu.users.email='$email'");
- $rows = array();
- while($r = mysql_fetch_assoc($sqldata)) {
- $rows['id'] = $r['id'];
- $rows['first_name'] = $r['name'];
- $rows['last_name'] = $r['lastname'];
- $rows['email'] = $r['email'];
- $rows['phone'] = $r['mobile'];
- }
- echo json_encode($rows);
- mysql_close($conn);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement