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

Ads
 

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
To retrive data from database - Struts
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
how to retrive data grom database in jsp pages.
retrive data from database using jsp in struts?
how to insert data into database using jsp & retrive
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 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 ?????/
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
how to write to java program to get the particular data from the website
how to retrieve data from database
Selecting particular data from multiple tables at database and perfoming calculations
PHP MySQLi
How to retrive an inmage from database and displaying it in imgae box - Swing AWT
store and retrive image from the database
PHP MySQLi Affected Rows
how to display data from database in jsp
How to Retrieve Data from Facebook Using PHP
How to Retrieve Data from Facebook Using PHP

Ads