Use PHP Variable according to Select DropDown
I am trying to change to which php variable to use according to Select
Dropdown selection. I am aware of how to change the value using jQuery
.change but in this case as I am using a variable and php runs on page
load and have nothing to do with jquery so I am using two variables but do
not know how to use, please help.
Below are the two php variables:
$str201 =
'21|'.$paygate_id.'|'.$name.'|'.$amount.'|'.$currency.'|'.$return_url.'|'.$transaction_date.'|'.$start_date.'|'.$end_date.'|201|NO||'.$key;
$str202 =
'21|'.$paygate_id.'|'.$name.'|'.$amount.'|'.$currency.'|'.$return_url.'|'.$transaction_date.'|'.$start_date.'|'.$end_date.'|202|NO||'.$key;
Select DropDown
<select name="selectFrequency" id="selectFrequency">
<option value="">- Select -</option>
<option value="201">1</option>
<option value="202">2</option>
</select>
Hidden Input of which I need to change php variable on select change:
<input type="hidden" name="CHECKSUM" value="'.md5($str).'">
No comments:
Post a Comment