Also, I am getting an error.
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in c:\program files\web\easyphp\www\in_progress\survey\stats.php on line 46
I am trying to use the statement you gave me with my own values. I am using it in a different application, becuase I think it will help me with that also.
Here is my script:
<?
//Database user info
$username="root";
$password="";
$database="survey";
//Connect to database
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
//Display values from form field 1
$query="SELECT method_of_communication FROM results WHERE method_of_communication='email only'";
$number=mysql_num_rows($query);
echo $number;
//print errors if any on page feild 1
echo mysql_error();
//disconnect from the database
mysql_close();
?>