Arkadaslar elimde tc no dogrulama fonksıyonu var fakat bunu nasıl kullanacagım ? nereye yerlestırıcem? asagıda fonksıyonu ve sıte kodlarımı paylasıyorum yardımcı olursanız mınnettar lkalırım.
// *** Redirect if username exists $MM_flag="MM_insert"; if (isset($_POST[$MM_flag])) { $MM_dupKeyRedirect="tc_var_uyari.php"; $loginUsername = $_POST['uyetcno']; $LoginRS__query = sprintf("SELECT uyetcno FROM uyeler WHERE uyetcno=%s", GetSQLValueString($loginUsername, "text")); mysql_select_db($database_hastanedb, $hastanedb); $LoginRS=mysql_query($LoginRS__query, $hastanedb) or die(mysql_error()); $loginFoundUser = mysql_num_rows($LoginRS);
//if there is a row in the database, the username was found - can not add the requested username if($loginFoundUser){ $MM_qsChar = "?"; //append the username to the redirect page if (substr_count($MM_dupKeyRedirect,"?") >=1) $MM_qsChar = "&"; $MM_dupKeyRedirect = $MM_dupKeyRedirect . $MM_qsChar ."requsername=".$loginUsername; header ("Location: $MM_dupKeyRedirect"); exit; } }
$LoginRS__query=sprintf("SELECT uyetcno, uyesifre FROM uyeler WHERE uyetcno=%s AND uyesifre=%s", GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
$LoginRS = mysql_query($LoginRS__query, $hastanedb) or die(mysql_error()); $loginFoundUser = mysql_num_rows($LoginRS); if ($loginFoundUser) { $loginStrGroup = "";
if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();} //declare two session variables and assign them $_SESSION['MM_Username'] = $loginUsername; $_SESSION['MM_UserGroup'] = $loginStrGroup;