sorry it should be the if condition are like this not like yours https://www.domain.com/au else http://www.domain.com/au with an https Regards, Gunawan ________________________________ From: Fajar Dhumadi <getime2000@xxxxxxxxx> To: "php-objects@xxxxxxxxxxxxxxx" <php-objects@xxxxxxxxxxxxxxx> Sent: Wednesday, June 27, 2012 9:42 AM Subject: Re: send variable in form action I have test your code in my local and try submit, it work fine both to http://www.domain.com.au/ or http://www.domain.com.au/ it open new page and go to define target url so likeI have say, you don't have problem in your snippet code. Try examine your other code like in your page javascript. If you cannot found suspicious code there, try full scan to your computer, may be your browser had been infected. Best regards, -- Fajar Dhumadi ________________________________ From: Gunawan <undoprojects@xxxxxxxxx> To: "php-objects@xxxxxxxxxxxxxxx" <php-objects@xxxxxxxxxxxxxxx> Sent: Wednesday, June 27, 2012 9:30 AM Subject: Re: send variable in form action 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] [Non-text portions of this message have been removed] [Non-text portions of this message have been removed]