All pastes #729746 Raw Edit

Unnamed

public php v1 · immutable
·published 2007-10-08 08:42 UTC
rendered paste body
<?PHP	require(getcwd() . "/inc/config.php");	$connection = @mysql_connect($db_host, $db_user, $db_password) or die("Error connecting to the database!");	require(getcwd() . "/header.php");	mysql_select_db($db_name, $connection);		$info = array('title', 'poster', 'description', 'embed', 'category');        $passed = true;        foreach ($info as $in) {            if (!isset($_REQUEST[$in])) {                 $passed = false;                 break;             }        }        if (!$passed) {                echo("You have not completed the necessary information to submit!");        }			$title = $_POST["title"];		$poster = $_POST["poster"];		$posterurl = $_POST["posterurl"];		$category = $_POST["category"];		$description = $_POST["description"];		$embed = $_POST["embed"];		$date = time();				$query = "INSERT INTO video (id, title, poster, posterurl, category, embed, description, date_auto, rating) VALUES (NULL, '$title', '$poster', '$posterurl', '$category', '$embed', '$description', '$date', '0');";		mysql_query($query, $connection) or die(mysql_error());							echo('<div class="video_confirm">Thank you for your submission<br />');			echo('<a href="index.php">Return to the main page</a></div>');	require(getcwd() . "/footer.php");?>