php forms: value="<?php=$_POST['total_amount']?> vs. value="<?=$_POST['total_amount']?> -
my form generating error when use:
<input type="hidden" name="total_amount" value="<?php=$_post['total_amount']?>" />
however works fine when use:
<input type="hidden" name="total_amount" value="<?=$_post['total_amount']?>" />
i thought insecure use <?=
instead of <?php
.
here complete form:
<form name="save_file" action="cyprus_funds_transfer.php" method="post" enctype="multipart/form-data"> <? if($_post['value_type'] == 1) {?> <input type="hidden" name="amount" value="<?php=$_post['account_number']?>" /> <input type="hidden" name="value_type" value="1" /> <input type="hidden" name="total_amount" value="<?php=$_post['total_amount']?>" /> <? } else { ?> <input type="hidden" name="amount" value="<?php=$_post['amount']?>" /> <input type="hidden" name="value_type" value="0" /> <? } ?> <input type="hidden" name="to" value="<?php=$_post['send_to']?>" /> <input type="hidden" name="from" value="<?php=$_post['send_from']?>" /> <input type="hidden" name="message" value="<?php=$_post['message']?>" /> <input type="hidden" name="mode" value="save" /> <input type="hidden" name="order_id" value="<?php=$order_id?>" /> <input type="hidden" name="email_id" value="<?php=$_post['email_id']?>" /> </form>
this wrong way
<?php=$_post['send_to']?>
this correct way
<?=$_post['send_to']?> similar <?php echo $_post['send_to']; ?>