Database Coding for Sample TPO Project in PHP :
// connecting database require "connect.php";
// Deleting the selected record.
if($_GET['action']=='delete')
{ $id=$_GET['id'];
// it contains the particular record id.
$qry2="delete from ug where id='$id'";
qrun2=mysql_query($qry2) or die(mysql_error());
}
//Declaring the database variablesif($_POST['list'])
{
$reg_no=$_POST['reg_no'];
$roll_no=$_POST['roll_no'];
$name=$_POST['name'];
$xtmark=$_POST['xtmark'];
$xiimark=$_POST['xiimark'];
$batch=$_POST['batch'];
$dept=$_POST['dept'];
$sem1=$_POST['sem1'];
$sem2=$_POST['sem2'];
$sem3=$_POST['sem3'];
$noofsem = $_POST['noofsem'];
}