Johnson
how to retrive the particular data from database in php with mysql?
1 Answer(s)      3 years and 10 months ago
Posted in : PHP

when am using mysqlfetcharray() that display the following error. the code look like this..

<?php


$con = mysql_connect("localhost","root","");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("samp", $con);
$Name=$_POST['unames'];
$data=mysql_query("SELECT * FROM tbl_sample where Name='$Name'");

/*$info=mysql_fetch_array($data);*/
while($info=mysql_fetch_array($data))
{
echo"<b>NAME</b>:".$info['Name']."<br><b>KEYSKILLS</b>:".$info['Keyskills']."<br><b>EXPERIENCE</b>:".$info['Experience']."<br><b>CURRENT ADDRESS</b>".$info['CurrentAddress']."<br><b>PERMANANT ADDRESS</b>".$info['PermanantAddress']."<br><b>COMPANY ADDRESS</b>".$info['CompanyAddress']."<br><b>MOBILE NO</b>".$info['MobileNo']."<br><b>QUALIFICATION</b>".$info['Qualification']."<br><b>CURRENT LOCATION</b>".$info['CurrentLocation']."<br><b>STATE</b>".$info['State']."<br><b>NATIONALITY</b>".$info['Nationality']."<br><b>DATE OF BIRTH</b>".$info['DOB'];
}
mysql_close($con);
?>

this shows the error like this....

Warning: mysqlfetcharray(): supplied argument is not a valid MySQL result resource in C:\wamp\www\sample\related.php on line 15

plz give suggestion..

Thanks in advance

Advertisement









Related Tutorials/Questions & Answers:
Advertisements