hi can anybody help me i need to get the data from db through php script my code is :
<?php
$con=mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("poll",$con);
echo "DB SELECTED<br>";
$result=mysql_query("select question from pollquestions",$con);
echo "QUERY EXECUTED<br>";
echo $result ;
echo "<br>DATA DISPLAYED<br>";
mysql_close($con);
?>
but its returning me only resource id#3 why i could not get the actual data from the database
mithesh 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.