<?php
$status=mysql_connect('localhost','root','');
if(!$status)
{
echo "Unable to connect";
}
else
{
echo "Successfully connected";
}
mysql_select_db("project",$status);
$insrt="INSERT INTO stuinfo VALUES
('$_POST[name]','$_POST[fname]','$_POST[address]','$_POST[dob]','$_POST[Course]','$_POST[Branch]','$_POST[batch]','$_POST[rno]','$_POST[reg]','$_POST[gender]')";
mysql_query($insrt,$status);
$selct="SELECT * FROM stuinfo";
$result=mysql_query($selct);
while($row = mysql_fetch_array($result))
{
echo $row['Name'],$row['Fathersname'],$row['Address'],$row['DOB'],$row['Course'],$row['Branch'],$row['Batch'],$row['RollNo'],$row['UnivRegNo'],$row['Gender'];
echo "<br />";
}
?>