Database Connectivity PHP Program For Beginner and Advanced 2011

Here you can see some sample coding for beginner or advanced user to do database connectivity program in php language. The database must any type database like mysql,sql etc.

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'];

}

Recommended Posts



Privacy Policy

All the Colleges, Schools, Universities, Top lists, Interview question paper, Programming, Tips, Tutorials and all other's just information purpose only. We are not responsible for any damages caused to you.