how to retrive the particular data from database in php with mysql?

how to retrive the particular data from database in php with mysql?

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

View Answers

Ads









Related Tutorials/Questions & Answers:
how to retrive the particular data from database in php with mysql?
How to retrive a particular record from database in php with mysql?
Advertisements
retrive data from database?
retrive data from database
how to retreive data from database of a particular user after login
how to retreive data from database of a particular user after login
GWT -- retrive the data from Database
retrive data from database using jsp in struts?
By dropdownlist retrive data from database and show in textbox in jsp.
retrive the data from access database to drop down list box in jsp
how to insert data into database using jsp & retrive
url parameter using retrive data from database in jsp
Retrive data from database and perform binary tree operations on that data in jsp or java
url parameter using retrive data from database in jsp
Selecting particular data from multiple tables at database and perfoming calculations
store and retrive image from the database
how retrive data from google analystics dashbord on the client machine
how to retrieve data from database ?????/
how to retrieve data from database ?????/
how to retrieve data from database ?????/
how to retrieve data from database ?????/
how to retrieve data from database
how to write to java program to get the particular data from the website
store & retrive the image from oracle database
How to Retrieve Data from Facebook Using PHP
How to Retrieve Data from Facebook Using PHP
how to create a php script to download file from database mysql
how to create a php script to download file from database mysql
retrive image from database using jsp without stream
how to store and retrieve images int and from the database using php
retrive data from oracle to jsp

Ads