$require = "SELECT email_activation, sampleAreaExpert, testLimit, score FROM signup_writers WHERE email='" . $Username . "'"; $con1 = mysqli_fetch_object(mysqli_query($conn, $require)); $emailActive = $con1->email_activation; $sampleExpert = $con1->sampleAreaExpert; $testLimit = $con1->testLimit; $score = $con1->score; if ($emailActive == 0) { header("Location: ../writerLogin.php?attempt=error"); session_destroy(); } else { if ($testLimit < 4) { if ($score > 10) { $emailCk = "SELECT email FROM writerprofile WHERE email='" . $Username . "'"; $r2 = mysql_query($emailCk); if (mysql_affected_rows() == 0) { $sql2 = "INSERT INTO writerprofile (email) VALUES ('{$Username}')"; errorChk($sql2); } header("Location: ../../writers/"); } else { header("Location: ../../writerTest.html"); } } else { header("Location: ../writerLogin.php?attempt=error"); session_destroy(); } } exit; //proceed to perform website’s functionality – e.g. present information to the user } mysql_close();
die('Error: ' . mysql_error()); } } $fName = $_POST['fName']; $lName = $_POST['lName']; $email = $_POST['email']; $pass = $_POST['pass']; $mobile = $_POST['mobile']; $experience = $_POST['experience']; $date = date("Y-m-d H:i:s"); $emailCk = "SELECT email FROM signup_writers WHERE email='" . $email . "'"; $r = mysql_query($emailCk); $emailActivationcode = rand(111111, 999999); if (mysql_affected_rows() == 0) { $sql = "INSERT INTO signup_writers (firstName, lastName, email, password, mobile, signUp_dateTime, experience, emailActivationCode) VALUES ('{$fName}', '{$lName}', '{$email}', '{$pass}', '{$mobile}', '{$date}', '{$experience}', '{$emailActivationcode}')"; $to = $email; $subject = "Warm welcome to Writers"; $message = "Dear " . $fName . " " . $lName . ",<br><br>\n\nYour account has been created on whitepanda.in .Kindly click on this link to confirm and access your account: http://www.whitepanda.in/php/databaseCall/emailVerify.php?email=" . $email . "&activeKey=" . $emailActivationcode . "<br><br>\nA very warm welcome to White Panda. You are now part of one of the nation’s biggest community of freelance writers. Being a part of White Panda you now get access to a large job feed in your area of expertise.<br>\n1.\tVisit the Writer Workbench and click on job search.<br>\n2.\tClick on the link at the top to give a topic proficiency test.<br>\n3.\tAfter completing the proficiency test, our editors will assign you a paygrade within 24 hours. Once that is assigned, you may start applying for jobs in your industry using the job search option.<br><br>\nKindly go through the attached FAQ sheet for more details. In case of any queries, feel free to mail us support@whitepanda.in<br><br><br><br>\n\nRegards,<br>\nTeam White Panda\n\n"; // Always set content-type when sending HTML email $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; // More headers $headers .= 'From: White Panda <*****@*****.**>' . "\r\n"; mail($to, $subject, $message, $headers); errorChk($sql); } else { header("Location: ../writerSignUp.php?attemp=1"); exit; } mysql_close(); header("Location: ../../afterWriterSignUpEmailVerify.html");