Location: PHPKode > projects > Basic Announce > UPLOAD/basic_admin/insert.php
<?php
$con = mysql_connect("SERVER_ADDRESS","USER","PASSWAORD");

if (!$con)

  {

  die('Could not connect: ' . mysql_error());

  }



mysql_select_db("DATABSE NAME", $con);



$sql="INSERT INTO announcements (Announcement,Submitted,Date_time)

VALUES

('$_POST[Announcement]','$_POST[Submitted]',now('y,m,d,h,i,s'))";



if (!mysql_query($sql,$con))

  {

  die('Error: ' . mysql_error());

  }

echo "Announcement Saved and Displayed";



mysql_close($con)

?> 
Return current item: Basic Announce