sorry, i can not put it online first, i already debug it and it showing variable all, is there any suggestion for any code regarding it Regards, Gunawan ________________________________ From: Fajar Dhumadi <getime2000@xxxxxxxxx> To: "php-objects@xxxxxxxxxxxxxxx" <php-objects@xxxxxxxxxxxxxxx> Sent: Wednesday, June 27, 2012 9:08 AM Subject: Re: send variable in form action Please provide the live url page so the page can examine directly because if just see from your snippet there is no problem with it. Best regards, -- Fajar Dhumadi ________________________________ From: Gunawan <undoprojects@xxxxxxxxx> To: "php-objects@xxxxxxxxxxxxxxx" <php-objects@xxxxxxxxxxxxxxx> Sent: Tuesday, June 26, 2012 3:29 PM Subject: send variable in form action Hi, Is there any one can help me to solve my problems, in PHP if condition, my code is always sending to the else while the value is all, suppose to be to sending to https://www.domain.com.au, here is the code <form name="frmReservation" id="frmReservation" action="<? if ($value['name'] == 'all'){ echo 'https://www.domain.com.au/';} else { echo 'http://www.domain.com.au/'; } ?>" method="get" target="_blank"> <fieldset> <select id='channel_code' name='id'> <? if ($value['name'] == 'all' ) { ?> <option value="rollup" selected="selected">rollup</option> <? } else { ?> <? foreach($hotelArr as $key => $value) { ?> <option value="<?=$value["book_url"]?>"><?=$value["name"]?></option> <? } ?> <? }?> </select> </fieldset> <fieldset> <input id="start_date" name="start_date" type="text" value="<?=date('d M Y')?>" class="date" readonly="readonly" /> </fieldset> <div class="clear"></div> <fieldset class="btn"> <button type="submit" class="btnBooking">GO</button> </fieldset> </form> Regards, Gunawan [Non-text portions of this message have been removed] [Non-text portions of this message have been removed] [Non-text portions of this message have been removed]