<?php
$conn=mysql_connect("localhost","root","");
if($conn)
{
echo("Connection Successfully");
$seldb=mysql_select_db("test",$conn);
if($seldb)
{
echo("Database selected successfully");
$retrive=mysql_query("select name,number from login1 where name='sateesh'",$conn);
if($retrive)
{
echo("Successfully data retrived<br>");
$result=mysql_fetch_row($retrive);
echo ("Name".$result[0]);
echo ("Number".$result[1]);
}
else
{
echo "Table not inserted";
}
}
else
{
die("database not selected");
}
}
else
{
die("connection faild");
}
mysql_close($conn);
?>