-
Notifications
You must be signed in to change notification settings - Fork 0
/
signpro.php
63 lines (51 loc) · 1.4 KB
/
signpro.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
60
61
62
63
<?php
if(isset($_POST['email']))
{
session_start();
include("connect.php");
$fn=$_POST['fn'];
$ln=$_POST['ln'];
$email=$_POST['email'];
$gen=$_POST['gen'];
$dob=$_POST['dob'];
$passwd1=$_POST['passwd'];
$cpasswd=$_POST['passwdc'];
$date = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$cdate=$date->format('d-m-Y H:i:s a');
$contno=$_POST['contactno'];
if($_POST['gen']=="Male")
{
$img="images/user.jpg";
}
else{
$img="images/fuser.jpg";
}
$q=mysql_query("select * from userdetail where email='$email'") ;
if($row=mysql_fetch_array($q))
{
$_SESSION['ee']="allready exit this email id.";
header("location:ragister.php");
}
else{
if($passwd1==$cpasswd)
{
$mi="images/mailbox1.jpg";
$passwd=md5($_POST['passwd']);
$Q=mysql_query("insert into remaildetail (pname,email_to,email_from,email_message,email_datetime,email_subject) values('$mi','$email','mailboxteam@gmail.com','welcome to mailbox','$cdate','welcome')") or die("Not Work");
$sql = "INSERT INTO userdetail (`firstname`, `lastname`, `gender`, `dob`, `email`, `password`, `contact_no`,`name`) VALUES ('$fn', '$ln','$gen', '$dob', '$email', '$passwd', '$contno','$img')";
mysql_query($sql);
$_SESSION['usrid']=$email;
$_SESSION['usr']=$fn." ".$ln;
header("location:home.php");
}
else{
$_SESSION['et']="please check your conform password.";
header("location:ragister.php");
}
}
include "close.php";
}
else{
header("location:ragister.php");
}
?>