PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
// (1) Open the database connection
$connection = mysql_connect("localhost","root","secret");
// (2) Select the winestore database
mysql_select_db("winestore", $connection);
// (3) Run the query on the winestore through the connection
$result = mysql_query ("SELECT winery_name
, phone, fax from winery", $connection);
while($row = mysql_fetch_array($result))
{
print "THe {$row["winery_name"]} winery's fax is {$row["fax"]}";
print "Their phone is {row["phone"]}.\n";
}
?>
Mike, hopefully you have a program that color codes things like that for you in php. Especially as a new coder, that's an easy mistake to make. If you can't afford anything that's big (or don't want to spend the money), maybe you could try Vim?
Mike, try Kieran's. It's much more user-friendly, especially to someone newer to php. Vim is a lot like a command-prompt, and the only reason I know it exists is from puTTy.