Location: PHPKode > scripts > Startpage > startpage/new.php
<?
//***************************************************
//	Startpage v1.1 by Matthijs Draijer
//	
//	Use of this script is free, as long as
//	it's not commercial and you don't remove
//	my name.
//
//***************************************************

include ("config.php");
include ("functions.php");
include ("PageTop.php");
include ("language_uk.php");
connect_db();

$url = $_POST[url];
$title = $_POST[title];

if(isset($_POST[submit])) {
	$InsertQuery = "INSERT INTO $cfgTableData ($cfgDataURL, $cfgDataTitle) VALUES ('". AddSlashes($url) ."', '". AddSlashes($title) ."')";
	
	if(mysql_query($InsertQuery)) {
		echo "<b>$title</b> $lngNewSucces.";
	} else {
		echo "$lngNewError <b>$title</b>.";
	}
	
	echo "<META HTTP-EQUIV='Refresh' CONTENT='2; URL=index.php'>\n";
} else {	
	if(isset($_POST[get_title])) {
		$title = PageTitle($url);
	}		
	
	echo '<center>'. NL;
	showEditForm ($title, $url);
	echo '</center>'. NL;
}

include ("PageBottom.php");
?>
Return current item: Startpage