Hello everybody i'm trying to get a result from a FORM but because i am new at php can't understand here is the code :
<form method=post action="<?php echo $PHP_SELF?>">
<select name="cat[]" size="1">
<?php
$option[0] = " ";
$option[1] = "Wines";
$option[2] = "Olive Oil";
$option[3] = "Archeological";
$option[4] = "Music";
$option[5] = "All";
$d=0;
for ($c=0;$c<=5;$c++) {
if ($cat[$d] == $option[$c]) {echo "<OPTION SELECTED>$option[$c]</OPTION> ";$d++;}
else {echo "<OPTION>$option[$c]</OPTION> ";}
}
?>
</SELECT>
<?php
....
?>
i want an if statement for each option so if the user press wines for example i have ready function that gives some results how i can put an if and understand that $option = wines so i can put inside my function.!!! can anyone help...please help me..thans