} } else { $checkcodemelli = true; } } } if (!$checkcodemelli) { if ($firstname && $lastname && $password && $cpassword && $father && $year && $month && $day) { $firstnamet = test_input($firstname); // check if name only contains letters and whitespace if (!preg_match('/^[پچجحخهعغفقثصضشسیبلاتنمکگوئدذرزطظژؤإأءًٌٍَُِّ\\s]+$/u', $firstnamet)) { echo "فقط فارسی تایپ کنید"; } else { $firstnamemd5 = encrypt($firstname, $codemelli); $codemellimd5 = encrypt($codemelli, $codemelli); $oci->update("T1", "T1_2", $firstnamemd5, "T1_1", $codemellimd5); } $lastnamet = test_input($lastname); // check if name only contains letters and whitespace if (!preg_match('/^[پچجحخهعغفقثصضشسیبلاتنمکگوئدذرزطظژؤإأءًٌٍَُِّ\\s]+$/u', $lastnamet)) { echo "فقط فارسی تایپ کنید"; } else { $lastnamemd5 = encrypt($lastname, $codemelli); $codemellimd5 = encrypt($codemelli, $codemelli); $oci->update("T1", "T1_3", $lastnamemd5, "T1_1", $codemellimd5); } $fathert = test_input($father); // check if name only contains letters and whitespace if (!preg_match('/^[پچجحخهعغفقثصضشسیبلاتنمکگوئدذرزطظژؤإأءًٌٍَُِّ\\s]+$/u', $fathert)) { echo "فقط فارسی تایپ کنید"; } else {
$codemellimd5 = encrypt($codemelli, $codemelli); $checkcode = $oci->fetchRow("*", "T1", "T1_1", $codemellimd5); if ($checkcode != 0) { echo "کد ملی قبلا وجود دارد"; } else { $codemellimd5 = encrypt($codemelli, $codemelli); $oci->insert("T1", "T1_1", $codemellimd5); echo "Your national code inserted successfully"; $checkcodemelli = true; } } } if ($checkcodemelli) { $nowt = strtotime("Now"); $codemellimd5 = encrypt($codemelli, $codemelli); $oci->update("T1", "T1_18", $nowt, "T1_1", $codemellimd5); // چک کردن اینکه تمامی فیلد ها بر شده باشد if ($email && $cemail) { //چک کردن اینکه ایمل های وارد شده در دو مرحله با هم یکسان باشد if ($email == $cemail) { //چک کردن اینکه ایمیل وارد شده معتبر باشد $email = test_input($email); //چک کردن کرکترهای وارد شده در فیلد ایمیل if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { echo "your email address is invalid try again"; } else { //برقراری اتصال به دیتابست $emailmd5 = encrypt($email, $codemelli); $checkmail = $oci->fetchRow("T5_3", "T5", "T5_3", $emailmd5); var_dump($checkmail); if ($checkmail != 0) {