function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$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;
}
$isim= GetSQLValueString($_GET['isim'], "text");
$abonenu = GetSQLValueString($_GET['abonenu'], "text");
$istek = GetSQLValueString($_GET['istek'], "text");
$zaman = GetSQLValueString($_GET['date("d.m.Y,H:i",time())'], "text");
$sorgu = "INSERT INTO abone (alan,alan2) VALUES(".GetSQLValueString($_GET['isim'], "text").", ".GetSQLValueString($_GET['abonenu'], "text").",".GetSQLValueString($_POST['istek'], "text").")";
$sorgu=mysql_query("INSERT INTO abone (isim, abonenu, istek, zaman) values ('$isim', '$abonenu','$istek','$zaman')");
if ($sorgu) {
echo "<font color=#ffffff><b> ** SİPARİŞİNİZ ALINDI **</b></font><br><br>";
}else{
echo "<font color=#ffffff><b>ÜZGÜNÜZ :( ** LÜTFEN TEKRAR DENEYİN **</b></font><br><br>";
}
?>sanrm yanlış oldu küçük bi ornek gösterebilirmisiniz
boyle kaydediyo
Tarih Saat......:NULL Abone İsmi.....:NULL Abone Nu.......:NULL Telefon.........:NULL
<?php
include("ayar.php");
$isim=$_POST['isim'];
$abonenu=$_POST['abonenu'];
$istek=$_POST['istek'];
$zaman = date("d.m.Y,H:i",time());
$sorgu=mysql_query("INSERT INTO abone (isim, abonenu, istek, zaman) values ('$isim', '$abonenu','$istek','$zaman')");
if ($sorgu) {
echo "<font color=#ffffff><b> ** SİPARİŞİNİZ ALINDI **</b></font><br><br>";
}else{
echo "<font color=#ffffff><b>ÜZGÜNÜZ

** LÜTFEN TEKRAR DENEYİN **</b></font><br><br>";
}
?>