If I’m not mistaken, it would be similar to this.
[code]
TITLE OF PAGE
Enter Postal Code
[/code]
That would be the form page (form.php) and it redirects to form2.php, transferring what they entered as a postal code
Here is form2.php
[php]<?php
/*
Insert in here your
database settings
or if you want it,
session settings
which I assume
you know how to
do. I also assume
the database name
is form,but you can
change that to your
liking
*/
$code = $_POST[‘code’];
//That turns the code they entered into a variable
$sql = mysql_query(“SELECT * FROM form WHERE prices”);
$one = “SELECT * FROM form WHERE code=’$code’”;
$two = mysql_query($one);
$row = mysql_fetch_row($two);
$price = $row[1];
/*
You now know
the row that the
postal code is on.
Using that, you found
the corresponding
price in that what I
like to call, the one two
method. I made up that
name. If there is a column
between the postal code
and the price, then that
means that you have
to change it from row[1]
to row[2] etc. The code
would be row[0] then
as the columns move on
they ascend to 1, 2, 3, etc.
*/
/*
The following is a
validation method.
It’s very tedious, and
not recommended for
multiple rows
*/
$item1 = “whatever_price_here”;
$item2 = “whatever_price_here”;
//And so on
/*
Then you can run a
loop to check if $price
equals any of those
variables, which I don’t
know how to do. You can
change that process to
whatever other method
*/
echo "The price is " . $price “”;
?> [/php]