<?php
// Other code
function addnews129($id) {
global $db;
session_start();
if(!isset($_SESSION['admin']) && !isset($_SESSION['password'])){
echo '<center><h3>Error!</h3></center>You do not have sufficeint permission to view this page.';
}else{
$query = "SELECT * FROM news WHERE id=$id";
$result = mysql_query ($query);
echo "<center><h3>Add News</h3></center>\n";
echo "<FORM action=\"{$_SERVER['PHP_SELF']}" .
"?action=addnews\" method=POST>\n";
echo "Title: <input type=\"text\" " .
"size=\"30\" name=\"title\"><BR>\n";
echo "<TEXTAREA cols=\"40\" rows=\"5\" " .
"name=\"news\"></TEXTAREA><BR>\n";
echo "<input type=\"submit\" name=\"submit\" " .
"value=\"Add News\"\n";
echo "</FORM>\n";
}
}
// Other code that has nothing to do with this function...just a switch statement...
?>