comparison user/getFBSession.php @ 15:385ddd7c4b55 testing

use test_db.php to get mysqld_test instance
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Sun, 19 Feb 2017 16:17:53 +0000
parents 077b0a0a3e6d
children
comparison
equal deleted inserted replaced
14:1477b5e6dd16 15:385ddd7c4b55
16 //login user 16 //login user
17 try { 17 try {
18 $uid = $facebook->getUser(); 18 $uid = $facebook->getUser();
19 $me = $facebook->api('/me'); 19 $me = $facebook->api('/me');
20 20
21 include "../../private/db.php"; 21 include "../../../private/db_test.php";
22 $Email = $me['email']; 22 $Email = $me['email'];
23 $FirstName = $me['first_name']; 23 $FirstName = $me['first_name'];
24 $Surname = $me['last_name']; 24 $Surname = $me['last_name'];
25 //echo $Email; 25 //echo $Email;
26 $sql1="SELECT FirstName, Surname, DisplayName, u.UserID, ReceiveEmail, GoodreadsState, LocID 26 $sql1="SELECT FirstName, Surname, DisplayName, u.UserID, ReceiveEmail, GoodreadsState, LocID
39 //echo $add; 39 //echo $add;
40 $result2 = mysqli_query($link, $add); 40 $result2 = mysqli_query($link, $add);
41 41
42 //reset connection 42 //reset connection
43 mysqli_close($link); 43 mysqli_close($link);
44 include "../../private/db.php"; 44 include "../../../private/db_test.php";
45 45
46 $sql3="SELECT FirstName, Surname, DisplayName, u.UserID, ReceiveEmail, GoodreadsState, LocID 46 $sql3="SELECT FirstName, Surname, DisplayName, u.UserID, ReceiveEmail, GoodreadsState, LocID
47 from user u, userpref p 47 from user u, userpref p
48 WHERE Email ='$Email' 48 WHERE Email ='$Email'
49 and u.UserID = p.UserID"; 49 and u.UserID = p.UserID";