Hello. I hope somoene can help me with this. I am VERY new to using PHP. I am trying to wade through my PHP for Dummies book to get a query done. I have code on my home page that references MySQL database and list categories. There is a “Select Category” button. When a user clicks on the Select Category button, it opens a page called processform.php. On this page, I want to be able to display the results from the query. I FINALLY have the drop down list created. I am them trying to create code on my processform.php code to create the table and display the results but have really hit a wall. I am trying to extrapolate code from examples in my PHP book but it really isn’t working. I hope someone can point me in the right direction and tell me if I am doing anything right. The following is what I have so far on my processform.php. The variable that is being looked up is a field called Category. There will then be fields called Business_Name, Phone, and City. If I am completely off in my code, can someone please point me somewhere where I can read code that makes sense to a beginner (or recommend another book other than the “For Dummies” book?) Thanks for your help!
[code]
$user = “***”;
$host = “**";
$password = "";
$database = "”;
$cxn = mysql_connect($host,$user,$password)
or die (“couldn’t connect to server”);
mysql_select_db($database,$cxn);
$query = “SELECT * FROM Clients WHERE Category=”{$_POST[‘Category’]}"";
$result = mysql_query($query,$cxn);
/* Display Results In A Table */
echo “
{$row[‘Business_Name’]} | n";{$row[‘Street’]} | n";{$row[‘City’]} | n";[/code]