Location: PHPKode > projects > Modular Site Manager > htdocs/sotw_man/add.php
<?
$db_data = array(
"localhost", 
"l33ad_vouksh",
"xf3G63Wt",
"l33ad_vouall",
"site_sotw"
);
$sitename = $_POST['sitename'];
$image = $_POST['image'];
$desc = nl2br($_POST['desc']);
$rating = $_POST['rating'];
$address = $_POST['address'];
$graphics = $_POST['graphics'];
$content = $_POST['content'];

$db = mysql_connect($db_data["0"], $db_data["1"], $db_data["2"]) or die("There was a mysql error: ".mysql_error());
mysql_select_db($db_data["3"]) or die("There was a mysql error: ".mysql_error());
$query = "INSERT INTO site_sotw ( `site` , `image` , `descr` , `rating` , `address` , `graphics` , `content` )
VALUES (
'$sitename', 'http://www.vouksh.info/sotw/$image', '$desc', '$rating', '$address', '$graphics', '$content'
);";
mysql_query($query) or die("There was a mysql error: ".mysql_error());
mysql_close($db);

header("Location: http://www.vouksh.info/");
?>
Return current item: Modular Site Manager