Location: PHPKode > projects > Basic Announce > insert.php
<?php

$con = mysql_connect("server","user","paswword");

if (!$con)

  {

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

  }



mysql_select_db("database", $con);



$sql="INSERT INTO demo (Announcement,Submitted)

VALUES

('$_POST[Announcement]','$_POST[Submitted]')";



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

  {

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

  }

echo "Announcement Saved and Displayed";



mysql_close($con)

?> 
Return current item: Basic Announce