更新时间:2022-04-26 04:07:46
male
和female
是字符串,因此请用引号引起来!
male
and female
are strings, so enclose with quotations!
应该是:
<?php if($_SESSION['gender'] == 'female'): ?>
<img src="img/Refaeli.jpeg"/>
<?php endif; ?>
<?php if($_SESSION['gender'] == 'male'): ?>
<img src="img/avidan.jpg"/>
<?php endif; ?>