I am having two problems with the following code.
#1. When I submit my form that executes this php code, I pass through a "varible" from a from field called companyname. The php is picking it up fine. But when it displays the results it is printing the indkey fields instead of the companyname. Nowhere in the script do I indicate that it should look at the indkey field. I have read and read and can't seem to find a solution.
#2. I have commented out the print statements, but it is still displaying results. Whats up with that? Again I have searched books, forums, and websites for solutions. Maybe I have the wrong books who knows.
Anyways thanks for your help in advance. It is very appreciated. P.S. I am a rookie so take it easy on me.
<?
//Connection Variables
$dbhost = "localhost";
$dbuser = "root";
$dbpass = "";
$dbname = "";
//Connect
$db = mysql_connect($dbhost,$dbuser,$dbpass);
mysql_select_db("$dbname",$db);
//Query
$query = mysql_query("SELECT * FROM members WHERE companyname ='$companyname'");
//list($companyname) = mysql_fetch_row($query);
while(list($companyname) = mysql_fetch_row($query))
{
echo $companyname."<BR>";
$companyname++;
}
//Display Results
//print ("\n Company Name: $companyname
//");
//print ("\n Description: $descr
//");
?>