I want to display the all the values in the column
it is only displaying the first value. i have 5 value inside that colum..
i think that there is something wrong witht the loop, i just dont seem to find the problem.. thank u
[code=php]
<?
$host = “localhost”;
$username = “localhost”;
$password = “abc123”;
$database = “contacts”;
$db = mysql_connect($host, $username, $password);
mysql_select_db($database);
$result=mysql_query($query);
$result = mysql_query(“SELECT * FROM `First Name:` WHERE `Position:`=`Position:`”
,$db) or die(mysql_error());
$myvar= “Hello World<br>”;
printf(“$myvar”);
$num_result = mysql_num_rows($result);
echo “Number of Results Found:” .($num_rows = mysql_num_rows($result));
$num_result = mysql_num_rows($result);
for($i=0; $i <$num_result; $i++)
{
$row = mysql_fetch_assoc($result);
printf(” <br>Position: %s<br>n”, mysql_result($result,0,”Position:”));
}
?>
displaying
Hello World
Number of Results Found:5
Position: owner
Position: owner
Position: owner
Position: owner
Position: owner