Thanks to the helpful people on this board, I have my little sample script doing the proper queries, and I'm on my way to creating my database-driven pages.
How can I create an html link that will populate the "WHERE casebrand = 'actionhardcasepages' " part of my query. For example, something like mydomain.com/samplescript.php?casebrand=actionhard ??
Here's the sample script:
<html>
<head>
<title>Test PHP</title>
</head>
<body>
<center>
<table border="0">
<?php
include('db_login.php');
mysql_connect($db_host, $db_username, $db_password) or exit(mysql_error());
mysql_select_db($db_database) or exit(mysql_error());
$result = mysql_query("SELECT * FROM newcases WHERE casebrand = 'actionhard' LIMIT 0, 30") or exit(mysql_error());
while ($row = mysql_fetch_assoc($result))
{
echo '
<tr height=30 class=accpart>
<td colspan=2 ALIGN=left>
Part #: ' . $row['partno'] . '
</td>
</tr>
<tr >
<td align=left class=small>
Suggested Price: <s>$' . $row['suggested'] . '</s>
</td>
</tr>
<tr >
<td align=left class=pricered>
Our Price: $' . $row['price'] . '
</td>
</tr>
<tr height=20>
<td colspan=4 valign=center align=center>
<hr>
</td>
</tr>
';
}
?>
</table>
</center>
</body>
</html>
Thanks again.
Rock