-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfetchuserdetails.php
More file actions
49 lines (49 loc) · 1.34 KB
/
Copy pathfetchuserdetails.php
File metadata and controls
49 lines (49 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
$current_user=$_SESSION['username'];
$user='root';
$password='';
$database='pinterest';
$con=mysqli_connect('localhost',$user,$password,$database);
if(!$con)
{
die("Unable to select database");
}
$query=$con->stmt_init();
$query->prepare("SELECT fname,lname,email,dob,gender,phone,aboutme,street,city,state,country,zip,picid,picurl,image FROM view_profile where uname=?") or die (Header ("Location : error.php"));
$query->bind_param("s",$current_user);
$query->execute();
$query->bind_result($fname,$lname,$email,$dob,$gender,$phone,$aboutme,$street,$city,$state,$country,$zip,$picid,$picurl,$image);
$query->fetch();
while($query->fetch()){
$fname=$fname;
$lname=$lname;
$email=$email;
$dob=$dob;
$gender=$gender;
$phone=$phone;
$aboutme=$aboutme;
$street=$street;
$city=$city;
$state=$state;
$country=$country;
$zip=$zip;
$picid=$picid;
$picurl=$picurl;
$image=$image;
}
$_SESSION['fname']=$fname;
$_SESSION['lname']=$lname;
$_SESSION['email']=$email;
$_SESSION['dob']=$dob;
$_SESSION['gender']=$gender;
$_SESSION['phone']=$phone;
$_SESSION['aboutme']=$aboutme;
$_SESSION['street']=$street;
$_SESSION['city']=$city;
$_SESSION['state']=$state;
$_SESSION['country']=$country;
$_SESSION['zip']=$zip;
$_SESSION['picid']=$picid;
$_SESSION['picurl']=$picurl;
$_SESSION['image']=$image;
?>