Date: 11/15/00
- Next message: magnus: "[PHP-DB] passing variables inside href links"
- Previous message: Sam Masiello: "RE: [PHP-DB] Mssql insert problem"
- Next in thread: CC Zona: "Re: [PHP-DB] HTTP 404 ERROR"
- Reply: CC Zona: "Re: [PHP-DB] HTTP 404 ERROR"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I can't find anything wrong with the script below but every time I try to
run it I get a page not found error HELP!
<html>
<head>
</head>
<form method="post" action="<?php echo $PHP_SELF?>">
<div align="center">
<p> </p>
<p><font size="3"><b><font face="Verdana, Arial, Helvetica,
sans-serif">From
Year: <select name="fromyear">
<option>1950</option>
<option>1951</option>
<option>1952</option>
<option>1953</option>
<option>1954</option>
<option>1955</option>
</select>
To Year: <select name="toyear">
<option>1956</option>
<option>1957</option>
<option>1958</option>
<option>1959</option>
<option>1960</option>
<option>1961</option>
<option>1962</option>
</select>
Make: <input type="text" name="vehmake">
Model: <input type="text" name="vehmodel">
<input type="submit" value="Search Inventory">
<input type="reset" name="Submit2" value="Clear Form">
</div>
</form>
<p> </p>
</blockquote>
<?php
$db = mysql_connect("LOCALHOST", "USERID", "PASSWORD")
or DIE("Unable to connect to database");
mysql_select_db(DATABASENAME,$db);
if ($fromyear == "")
{$fromyear = '%';}
if ($toyear == "")
{$toyear = '%';}
if ($vehmake == "")
{$vehmake = '%';}
if ($vehmodel == "")
{$vehmodel = '%';}
$result = mysql_query ("SELECT * from VehInventory",$db);
if ($row = mysql_fetch_array ($result)) {
do {
printf("<tr><td>%s %s</td><td>%s</tr>\n", $myrow["first"],
$myrow["last"],
$myrow["address"]);
print $row["VehYear"], $row["VehMakeLink"], $row["VehColor"],
$row["VehMileage"],
$row["VehPrice"];
print ("<p>");
} while ($row = mysql_fetch_array($result));
}else {print "Sorry, no records were found ";}
?>
</body>
</html>
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: magnus: "[PHP-DB] passing variables inside href links"
- Previous message: Sam Masiello: "RE: [PHP-DB] Mssql insert problem"
- Next in thread: CC Zona: "Re: [PHP-DB] HTTP 404 ERROR"
- Reply: CC Zona: "Re: [PHP-DB] HTTP 404 ERROR"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

