i am using a select on a form so my code looks kinda like this:
<?php
include 'header2.ht';
include 'pre_main.ht';
$com = "temp";
?>
<form name="dan" method="post" action="<?php print("pre.php?com=$com"
; ?>"><table><tr><td>Company Name</td><td>
<SELECT NAME="compName">
<?php
echo"<OPTION VALUE=\"AMCO\">AMCO";
echo"<OPTION VALUE=\"GM\">GM";
echo"<OPTION VALUE=\"TOYOTA\">TOYOTA";
echo"<OPTION VALUE=\"BUICK\">BUICK";
echo"</SELECT></td>";
echo "<input type=\"submit\" name=\"temps\" value=\"Search\">";
echo"</table></form>";
include 'bottom.ht';
?>
so what i want to happen when i hit submit is that com is set to the option value of whatever is selected. so basicially the page is reloaded with com being equal to whatever is selected. how do i set com equal to the option value?
thanks
<?php
include 'header2.ht';
include 'pre_main.ht';
$com = "temp";
?>
<form name="dan" method="post" action="<?php print("pre.php?com=$com"
<SELECT NAME="compName">
<?php
echo"<OPTION VALUE=\"AMCO\">AMCO";
echo"<OPTION VALUE=\"GM\">GM";
echo"<OPTION VALUE=\"TOYOTA\">TOYOTA";
echo"<OPTION VALUE=\"BUICK\">BUICK";
echo"</SELECT></td>";
echo "<input type=\"submit\" name=\"temps\" value=\"Search\">";
echo"</table></form>";
include 'bottom.ht';
?>
so what i want to happen when i hit submit is that com is set to the option value of whatever is selected. so basicially the page is reloaded with com being equal to whatever is selected. how do i set com equal to the option value?
thanks