我正在尝试仅使用 PHP if 条件显示文本内容,但我有几个错误,我看不出错误在哪里有人可以帮助我解决这个问题,这里是代码:
<?php
if(
isset($_POST['send']) &&
!validateDiscp($_POST['Discp']) || !validateSize($_POST['Size'])
) : ?>
<div id="error">
<ul>
<?php if(!validateDiscp($_POST['Discp'])):?>
<li><strong>Discription:</strong>Discription need to be larger then 10!</li>
<?php endif?>
<?php if(!validateSize($_POST['Size'])):?>
<li><strong>Invalid Size:</strong> Size needs to bi S M L XL</li>
<?php endif ?>
</ul>
</div>
<?php elseif(isset($_POST['send'])):?>
<div id="error" class="valid">
<ul>
<li><strong>Congratulations!</strong> All fields are OK ;)</li>
</ul>
</div>
<?php endif ;?>