Merhaba arkadaşlar,
kategori ekle sayfamda, kategori eklediğimde beni admin panelden atıyor, sistemden çıkış yapıyor. Ancak ürün-yönetici gibi başka komutlar eklediğimde sistemden atmıyor. Sebebi ne olabilir?
Kodlarım; "ekle.php"
<?php include "ust.php"; ?>
<!-- Content -->
<div class="content">
<div class="title"><h5>Ürün kategorileri ve ürün listeleme</h5></div>
<!-- Dynamic table -->
<div class="table">
<div class="head"><h5 class="iFrames">Kategoriler</h5></div>
<table cellpadding="0" cellspacing="0" border="0" class="display" >
<?php
require_once "ayarlar.php";
ob_start();
if ($id = $_GET["id"]){
if ($_POST){
$katadi = $_POST["katadi"];
$ustkatid = $_POST["ustkatid"];
$update = mysql_query("insert into edel_kategori set
kategori = '$katadi',
ustkat = '$ustkatid'");
if ($update){
header("Location:index.php");
}else {
echo mysql_Error();
}
} else {
function kategori ($id = 0, $string = 0, $ustid){
$query = mysql_query("select * from edel_kategori where ustkat = '$id'");
if (mysql_affected_rows()){
while ($row = mysql_fetch_array($query)){
echo '<option ';
echo $row["id"] == $ustid ? ' selected ' : null;
echo 'value="'.$row["id"].'">'.str_repeat('-', $string).$row["kategori"].' </option>';
kategori($row["id"], $string + 2, $ustid);
}
}else {
return false;
}
}
?>
<form action="" method="post">
<table cellpadding="5" cellspacing="5">
<tr>
<td>Kategori Adı: </td>
<td><input type="text" name="katadi" /></td>
</tr>
<tr>
<td>Üst Kategori: </td>
<td>
<select name="ustkatid">
<option value="0">Ana Kategori Olsun</option>
<?php kategori(0,0, $id); ?>
</select>
</td>
</tr>
<tr>
<td> </td>
<td><input type="submit" value="ekle" /> </td>
</tr>
</form>
<?php
}
}else {
header("Location:urun_kat_listele.php");
}
?>
</table>
</div>
<?php include "alt.php"; ?>
--R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 10:46:04 -->-> Daha önceki mesaj 10:39:24 --
Tamam sarınu çözdüm.
Bu kısımdaki index.php adresini
if ($update){
header("Location:index.php");
}else {
echo mysql_Error();
}urun_kat_listele.php yaptığımda sorun çözüldü