What I'm attempitng is to have a page consisting of a form field for users to enter their zip code. They would then go further down the SAME page and click on a category. The zip code they entered would be added to the urlencode of the category and clicking on the category name would go to another page. I can't figure out how to do it. Below is my code, which obviously does not work. Any help would be appreciated. Thanks.
<?php
echo ("<form>
<input type=\"text\" name=\"zip\">
</form>");
// set up loop counter
$col_count = 0;
echo '<table align="center" width="90%"><tr>';
$sql = "select * from work_cat order by cat_name";
$result = mysql_query($sql) or die(mysql_error());
while ($row=mysql_fetch_array($result)) {
if ($col_count == 4) {
echo '</tr><tr>';
$col_count = 0;
}
echo ("<td width=25%><a href=\"splash.php?ID=" . urlencode($row["ID"])." &zip=" . urlencode("$zip")."\">" . $row['cat_name']. "</a></td>");
$col_count++;
}
echo '</tr></table>';
?>