RE: send variable in form action

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At the top on the page put the following code.

<?

$value['name'] = $_POST["'id"];

?>




From: php-objects@xxxxxxxxxxxxxxx [mailto:php-objects@xxxxxxxxxxxxxxx] On Behalf Of Gunawan
Sent: Tuesday, 26 June, 2012 1:30 PM
To: php-objects@xxxxxxxxxxxxxxx
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]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux