[code]<?php
require_once 'connect.php';
include_once 'config.php';
if(isset($_POST['url']) && isset($_POST['name']) && isset($_POST['days'])){
$url=mysql_real_escape_string(htmlspecialchars($_POST['url']));
$name=mysql_real_escape_string(htmlspecialchars($_POST['name']));
$color=mysql_real_escape_string(htmlspecialchars($_POST['color']));
$days=abs(intval($_POST['days']));
$time = time()+(86400*$days);
$summa = abs(intval($_POST['summa']));
$pay = time();
if(empty($_POST['bold'])){$b='0';
}else{
$b='1';
}
if(empty($_POST['italic'])){$k='1';
}else{
$k='0';
}
mysql_query("INSERT INTO `rekl` SET `date`='$pay',`time` = '$time', `url`='$url', `name`='$name',`color`='$color',`bold`='$b',`italic`='$k',`summa`='$summa'"
or die(mysql_error());
header("Location: index.php?success"
;
exit;
}else{
header("Location: index.php?error"
;
exit;
}
?>[/code]