Viewing: signup.php
<?php
include 'db.php';
$postData=$_REQUEST;
if(isset($postData['id']) && $postData['id']>0)
{
$fname=$postData['fullname'];
$email=$postData['emailid'];
$mobile=$postData['mobileno'];
$password = $postData['password'];
$id= $pid = $postData['id'];
$token = md5(time().'-'.rand(0,9));
$query = "INSERT into `users` (FullName,EmailId,MobileNumber,Password,plantype,token,email_verification)
VALUES ('$fname', '$email','$mobile','".md5($password)."','$pid','".$token."',1)";
$result = mysqli_query($conn,$query);
if($result)
{
echo "registraton_success";
// $link="<a href='www.blissfintrip.com/verify.php?token=".$token."'>Click To Verify Email</a>";
// include'mailer/class.phpmailer.php';
// include'mailer/class.smtp.php';
// $mail = new PHPMailer();
// $mail->CharSet = "utf-8";
// $mail->IsSMTP();
// // enable SMTP authentication
// $mail->SMTPAuth = true;
// // GMAIL username
// $mail->Username = "blissfintrip@gmail.com";
// // GMAIL password
// $mail->Password = "xejtdiefiezvoult";
// $mail->SMTPSecure = "tls";
// $mail->IsHTML(true);
// // sets GMAIL as the SMTP server
// $mail->Host = "smtp.gmail.com";
// // set the SMTP port for the GMAIL server
// $mail->From="info@blissfintrip.com";
// $mail->FromName='blissfintrip';
// $mail->AddAddress($email, $fname);
// $mail->Subject = 'Verify Account';
// $mail->IsHTML(true);
// $mail->Body = 'Your account is successfully created. Please Click On This Link to Verify Account '.$link.'';
// if($mail->Send())
// {
// echo "registraton_success"; //Check Your Email and Click on the link sent to verify email
// }
// else
// {
// echo "mailler_error"; //$mail->ErrorInfo;
// }
}
else
{
echo "registraton_failed"; //Something went wrong. Please try again
}
}
else
{
echo "invalid_data";
}
exit;
?>
Back to File Manager