I am having a problem with a piece of code anyone see any problems in this code, it basically submits the data into the database.
PHP Code:<?php
require_once("./connect.php");
?>
<form action="<?php echo $_server['PHP_SELF']; ?> method="post">
<label>Insert news here:<br />
<textarea mame="newstext" rows="10" cols="40">
</textarea></label><br />
<input type="submit" value="SUBMIT" />
</form>
<?php
if (isset($_POST['newstext'])) {
$newstext = $_POST[newstest]';
$sql = "INSERT INTO news SET
newstext='$newstext',
if (@mysql_query($sql)) {
ecbo '<p>News had been submitted</p>';
} else {
echo '<p>Error adding news: ' .
mysql_error() . '</p>;
}
}
?>




