Peki şu index.php'deki hatayı söyleyebilir misin?
Formu veritabanına göndermiyor, boş gönderince hata da vermiyor...
<?
ob_start (); session_start();
include "config.php";
function Giris(){
$hata =$_GET['hata'];
if($hata=="1") {
echo "Bilgiler eksik girildi!";
}
echo "<body>
<div align=\"center\">
<form action=\"index.php?Sayfa=HesapYarat\" method=\"POST\">
<table width=\"462\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<th colspan=\"3\" scope=\"col\">Php Üyelik Formu </th>
</tr>
<tr>
<td>Kullanıcı Adı </td>
<td>:</td>
<td><input type=\"text\" name=\"kullanici\" size=\"20\" /></td>
</tr>
<tr>
<td>Şifre</td>
<td>:</td>
<td><input type=\"password\" name=\"sifre\" size=\"20\" /></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type=\"Submit\" value=\"Kaydet\" /> </td>
</tr>
</table>
</div>
</body>";
}
function HesapAc() {
$kullanici =$_POST['kullanici'];
$sifre =md5($_POST['sifre']);
if(($kullanici =="") or ($sifre =="")) {
header("location:index.php?Sayfa=Giris&hata=1");
}
else {
$ekle =mysql_query("insert into kullanici(kullaniciadi,sifre,tarih) values ('$kullanici','$sifre','$tarih')");
if (!$ekle) {
echo "Bilgiler Eklenemedi!";
}
else {
header ("location:index.php");
}
}
}
$sayfa= $_GET['Sayfa'];
switch($Sayfa){
default:
Giris();
break;
case "HesapYarat";
HesapAc();
break;
}
?>