Location: PHPKode > projects > BBViewer > BBViewerApp/bbviewer/admin/addnews.php
<?PHP

require('/library/webserver/auth.inc'); 
require('config.php');
require('connect.php');

?>

<TITLE><?php echo $domain ?> - Add News</TITLE>

<? INCLUDE("admintop.inc")?>

<div style="POSITION: absolute; TOP: 125px; LEFT: 5px;  width: 650px; Z-INDEX: 25">

<h3>Add News To Database:</h3><p>

<?php

if ($submit) {

//process form

$sql = "INSERT INTO news (email,postby,subject,message,postdate) VALUES ('$email','$postby','$subject','$message','$postdate')";

$result = mysql_query($sql);

echo "Thank you.  Your information has been entered.\n";

} else {

//display form

?>

<form method="post" action="<?php echo $PHP_SELF?>">

<table width=500px border=0>

<tr>

<td>Posted By:

<td><input type="text" id="text" name="postby">

<tr>

<td>E-Mail Address

<td><input type="text" id="text" name="email">

<tr>

<td>Subject:

<td><input type="text" id="text" name="subject">

<tr>

<td>Postdate:

<td><input type="text" id="text" name="postdate">

<tr>

<td>Message:

<td><textarea rows="5" cols="55" id="text4" name="message" value="none"></textarea>

</table>

<input type="Submit" name="submit" value="Enter Information">

</form>

<?php

}  //end if

?>

<? INCLUDE("../bottom.inc")?>

</div>
Return current item: BBViewer