I wondering if any know way to change values of variable using option drop-down list ??
php script is:
<?php $searchBoxfruit = "Red"; require_once('includes/search_box.php'); ?>
and option list
<option value="Type">Type</option>
<option value="Red">Red</option>
<option value="Green">Green</option>
<option value="Gray">Gray</option>
</select>
so basicly when user selected green option in drop down menu, $searchBoxfruit values must change to Green.
I try to fix this problem with this code:
$searchBoxfruit = "";
if (isset($_GET['0'])):
$searchBoxfruit = "Red";
elseif (isset($_GET['1'])):
$searchBoxfruit = "Blue";
elseif (isset($_GET['2'])):
$searchBoxfruity = "White";
else: (isset($_GET['3'])):
$searchBoxfruit = "Black";
endif;
php $searchBoxfruit = ""; require_once('includes/search_box.php');
but still it s does not work !!
Thanks for any hint.