I am doing the following in my main page but am not able to get the DB values to display. What am i missing? Thanks in advance...
<TR valign="middle" align="center">
<?php
mysql_connect("localhost","user1","password1");
mysql_select_db(user1_MYDB);
$table=survey_001;
$query="SELECT Choice FROM $table WHERE Choice='A'";
$result=mysql_query($query);
$numa=mysql_num_rows($result);
$query="SELECT Choice FROM $table WHERE Choice='B'";
$result=mysql_query($query);
$numb=mysql_num_rows($result);
mysql_close();
?>
<TD width="50%"><h3><?php echo $numa; ?></h3></TD>
<TD width="50%"><h3><?php echo $numb; ?></h3></TD>
</TR>
<TR valign="middle" align="center">
<?php
mysql_connect("localhost","user1","password1");
mysql_select_db(user1_MYDB);
$table=survey_001;
$query="SELECT Choice FROM $table WHERE Choice='A'";
$result=mysql_query($query);
$numa=mysql_num_rows($result);
$query="SELECT Choice FROM $table WHERE Choice='B'";
$result=mysql_query($query);
$numb=mysql_num_rows($result);
mysql_close();
?>
<TD width="50%"><h3><?php echo $numa; ?></h3></TD>
<TD width="50%"><h3><?php echo $numb; ?></h3></TD>
</TR>