| Yazan | Mesaj |
|---|---|
| |
|
|
Mesaj: DreanWeaver CS 5 Üyelik İle İlgili Sorun
Bu sayfadaki anlatımlardan yararlanarak DW ile bir üye kayıt formu oluşturdum, user adında textfield ekledim. Gönder butonuna bastığımda "Unknown column 'K.ADI' in 'where clause'" diye bir yazı çıkıyor. (K.ADI: Benim girdiğim bilgi) K.ADI yerine user (ya textfield ismi yada tablodaki bu bilginin kayıt olduğu sütun) yazdığımda kayıt tamamlanıyor. Sorunun nerden kaynaklandığını bulamadım. Alıntı: ?php require_once Connections/baglanti.php ; ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } // *** Redirect if username exists $MM_flag="MM_insert"; if (isset($_POST[$MM_flag])) { $MM_dupKeyRedirect="zaten_var.php"; $loginUsername = $_POST['user']; $LoginRS__query = sprintf("SELECT `user` FROM uyeler WHERE `user`=%s", GetSQLValueString($loginUsername, "-1")); mysql_select_db($database_baglanti, $baglanti); $LoginRS=mysql_query($LoginRS__query, $baglanti) 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; } } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "kayit")) { $insertSQL = sprintf("INSERT INTO uyeler (`user`, pass, email, adi, soyadi, dtarihi, web, kayit_tarih) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['user'], "text"), GetSQLValueString($_POST['pass'], "text"), GetSQLValueString($_POST['email'], "text"), GetSQLValueString($_POST['adi'], "text"), GetSQLValueString($_POST['soyadi'], "text"), GetSQLValueString($_POST['dtarihi'], "text"), GetSQLValueString($_POST['web'], "text"), GetSQLValueString($_POST['kayit_tarihi'], "date")); mysql_select_db($database_baglanti, $baglanti); $Result1 = mysql_query($insertSQL, $baglanti) or die(mysql_error()); $insertGoTo = "uyekayit_tamam.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } ?> |
|
|
|
| Henüz hiç Cevap eklenmemiş |
Şu anda: 9 ziyaretçi siteyi geziyor.
Sitemizden indirdiğiniz eklentileri nasıl yükleyeceğinizi ve kullanacağınızı bilmiyorsanız bu makaleden başlayabilirsiniz. Genel olarak Dreamweaver eklentileri üzerine kısa bir yazı buyrun...