forked from nizaranand/FaceLink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile_process.php
59 lines (44 loc) · 1.33 KB
/
profile_process.php
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
50
51
52
53
54
55
56
57
58
59
<?php
/**
* index.php
*
*Facelink home page with registration and login form
*
* Written by: Monideep a.k.a. deep The Grandmaster of PHP
*
*/
include("include/session.php");
?>
<?php
if(! isset($_POST['complete_profile'])){
header('location:complete_profile.php');
}
else{
$city=$_POST['city'];
$town=$_POST['town'];
$month=$_POST['month'];
$day=$_POST['day'];
$year=$_POST['year'];
$interest1=$_POST['interest1'];
$interest2=$_POST['interest2'];
$language=$_POST['language'];
$about=$_POST['about'];
$uname=$_POST['uname'];
$q="INSERT INTO profile(profile_id, city, town, month, day, year, interest1, interest2,language,about,uname) values('','$city','$town','$month','$day','$year','$interest1','$interest2','$language','$about','$uname')";
$result=mysql_query($q);
$_SESSION['city']=$city;
$_SESSION['town']=$town;
$_SESSION['month']=$month;
$_SESSION['day']=$day;
$_SESSION['year']=$year;
$_SESSION['language']=$language;
$_SESSION['about']=$about;
$_SESSION['interest1']=$interest1;
$_SESSION['interest2']=$interest2;
$_SESSION['cprofile']=true;
$temp=$_FILES['f']['tmp_name'];
$target="profile/$uname.jpg";
move_uploaded_file($temp,$target);
header('location:login.php');
}
?>