我写这些代码用于在我的项目中搜索功能。 如果用户输入正确的邮政编码,它会显示一个表单,如果邮政编码错误,它会显示一些我在其他条件下编写的邮件。 但是默认情况下,当用户第一次进入页面时显示else消息。 如果用户输入错误的邮政编码,我想显示(我在其他条件下写入的邮件)消息?任何建议。系统默认打印其他消息php
<small>Enter your zipcode to book our service</small>
<?php if($this->isAllowedZipcode=="Matched"){?>
<div class="row">
</div>
<?php } ?>
<?php } else
{ ?>
<div class="row">
<div class="col-sm-12 col-xs-12">
<p>Sorry but our services are not available in your area. We are working hard to cover as much area as we can. Thank you for using the system.</p>
<?php } ?>
你的代码似乎不完整,如果您使用的条件不明确,请重新检查你的代码 –
''结束你的'if'。 '<?php} else'继续__some other'if'__ –