<?
session_start();
include "../inc/logincheck.php";
include "../inc/conn.php";
if (isset($_POST['ekle'])){
$sql="INSERT INTO urunler (urunadi) VALUES ('{$_POST['urunadi']}')";
if(mysql_query($sql)){
echo "<script>location.href='records.php?msg=7'; </script>"; exit;
}else{
echo "<script>location.href='records.php?msg=8'; </script>"; exit;
}
}
if (isset($_POST['sil'])){
$sql="DELETE FROM urunler WHERE urunadi='{$_POST['silinecek']}'";
if(mysql_query($sql)){
echo "<script>location.href='records.php?msg=9'; </script>"; exit;
}else{
echo "<script>location.href='records.php?msg=10'; </script>"; exit;
}
}
?>