|
i want to get contact number as output but i see no data and no error in code generated, plz help. i have written my code below:
<html>
<body>
<center>
<table border="1">
<form method="post" action="out.php">
<tr>
<td>Name:</td><td><input type="text" name="bhai" size="30"></td>
</tr>
<tr>
<td><input type="submit" value="get data" size="20"></td>
</tr>
</form> </table>
</center>
</body></html>
<?
$a="$_POST[name]";
$user="root";
$host="localhost";
$password="";
$database="diki";
$connection=mysql_connect($host,$user,$password);
$db=mysql_select_db($database,$connection) or die( "Unable to select database");
$query = "SELECT contact FROM member where f_name='$a'";
$result=mysql_query($query) or die ("couldnot execute qrery");
$row=mysql_fetch_array($result);
echo "contact:$a";
mysql_close();
?>
|