All pastes #243641 Raw Edit

Miscellany

public php v1 · immutable
·published 2006-11-08 19:13 UTC
rendered paste body
<?phpif (isset ($_POST['submit'])) {	require_once('../dbconnect.php');	require_once('functions.php');		$query = "INSERT INTO clan_news (id, title, entry, date_entered) VALUES (0, {$_POST['title']}, {$_POST['entry']}, date('m-j-y') )";		if (@mysql_query ($query)) {		print 'News post successful. Click <a href="index.php?page=admin">here</a> to return to the admin panel.';	} else {		print mysql_error();			}		mysql_close();	}?><form action="" method="post">	<p>Post Title: </p><input type="text" name="title" size="40" maxsize="100" />	<p>Post Body: </p><textarea name="entry" columns="40" rows="4"></textarea> <br /><br />	<input type="submit" name="submit" value="Submit" /></form>