Here is my query, this is from the php that is called by the html form "action" parameter. So all the data should be in $result
Can i access $result from my html doc? Even if i could it takes me to the white blank page when "submit" is hit. Thanks.. --jake
$result = mysql_query("SELECT * FROM condo_vendors WHERE city='$localcity'");
while($row = mysql_fetch_array($result))
{
echo $row['biz_type'];
echo $row['name'];
echo $row['phone'];
echo $row['website'];
echo $row['username'];
echo $row['comment'];
echo $row['datevar'];
echo "<br />";
}
I
kinda found the answer myself.... so i will post so maybe someone else will benefit...
Basically php and html docs are one and the same. Name your html file *.php and then you can call php commands (sql queries) in an inline fashion at will. Just put your start and stop PHP tags around your PHP commands.
The db access login,passwd,dbaname will not show, because the document will be rendered. So its safe to view source and your db password and info will not be shown.
Hope that helps someone else... --jake
|