Ug, I've been messing around with a Housekeeping (habbo retro) that was released a while back; so yeah, I've just realised that Posting news doesn't work correctly. Just wondering if any of you may help me fix it.
Heres the code;
So, when I attempt to post it, I get the "Article Posted", however it hasn't actually posted it. Why does it not work?
Try to ignore my messy coding..
Heres the code;
PHP:
<?php
if($assoc['rank'] <5)
{
exit;
}
$title = $_POST['title'];
$shortstory = $_POST['shortstory'];
$banner = $_POST['banner'];
$content = $_POST['content'];
$sent = $_POST['sent'];
if($sent != 'yes') {
;echo '
<form name=\'postnews\' action=\'?page=news\' method=\'post\'>
<alert>
<develop>Creating news is currently broken!</develop>
<br>
Like some other features in this development build of Cores new housekeeping, Creating news is currently broken. If you would like an article
posted, then please contant an Administrator with Database access.
<br><br>
Sorry for any inconvenience.
</alert>
<br>
<center>
<b>Title:</b><br>
<input type=\'text\' name=\'title\' maxlength=\'20\'>
<br>
<b>Short Story:</b><br>
<input type=\'text\' name=\'shortstory\' maxlength=\'50\'>
<br>
<b>Banner URL (click <a href="../Public/Images/news/" target="_BLANK">here</a>):</b><br>
<input type=\'text\' name=\'banner\' maxlength=\'500\'>
<br>
<b>Full Story:</b><br>
<textarea class="ckeditor" cols=30 rows=7 name=\'content\'></textarea>
<br>
<input type=\'submit\' value=\'Post\'>
<input type=\'hidden\' name=\'sent\' value=\'yes\'>
</form></p>
';
}
else
{
$query = mysql_query("INSERT INTO cms_news (title, shortstory, longstory, author, published, image, campaign, campaignimg) VALUES ('".$title ."', '".$shortstory ."', '".$content ."', '1', '".time() ."', '".$banner ."', '0', '')");
echo "<center><h1>Article posted!</h1></center>";
;echo '
';
}
?>
So, when I attempt to post it, I get the "Article Posted", however it hasn't actually posted it. Why does it not work?
Try to ignore my messy coding..