我已经注册,登录,注销,通过使用本教程:http://www.html-form-guide.com/php-form/php-login-form.html如何让登录 - 注销swithces在PHP
另外,我试图让登录 - 注销swithes,并试图将它在tophead.php我的网站:www.virtucadd.com
--io试过,但它不工作---
<?php
if(condition){ // is the user logged in?
{$link = '<a href="logout.php">Logout</a>';
$welcome = $_SESSION['Username'];
}else{ // if not logged in
$link = '<a href="login.php">Logout</a>';
$welcome = 'guest';
}
?>
......
<li class="end"><?php echo $link; ?></li>
<li class="end"><?php echo $welcome; ?></li>
什么不起作用?你检查的条件是什么? – Jenz 2014-09-26 06:59:41
检查条件是否正确。 – Gowri 2014-09-26 07:01:13
你必须包括预期的行为和当前的行为 – mithunsatheesh 2014-09-26 07:02:22