Code:
<?
$linkID = @mysql_connect("mysql2.brinkster.com" , "zerographics2", "wwwwwwww") or
die ("connection lost");
mysql_select_db("shopping", $linkID);
mysql_query("INSERT INTO customer (customerID, firstName, lastName) VALUES (109, 'Martine', 'Edwards')", $linkID);
mysql_close($linkID);
$result = mysql_query("INSERT INTO customer (customerID,
firstName, lastName) VALUES (109, 'Martine', 'Edwards')",
"$linkID");
if ($result == true) {
print "Record Added";
} else {
print "Record Failed";
}
$resultID = mysql_query("SELECT * FROM customer", "$linkID");
print "<table><tr><td>Customer ID</td>";
print "<td>First Name</td><td>Last Name</td></tr>";
while ($row = mysql_fetch_row($resultID))
{
print "<tr>";
foreach ($row as $field)
{
print "<td>$field</td>";
}
print "</td>";
}
print "</table>";
?>