<!DOCTYPE html> <html lang="ja"> <head> <meta charset="utf-8"> <title>メンバーページ</title> </head> <body> <?php if(isset ($records)){ foreach ((array)$records as $row); echo $row; <a href="<?php echo "controllers_login/logout" ?>">ログアウト</a> } else{ echo 'hello guest'; } ?> </body> </html>
ログイン画面でログインしていた場合のみログアウトの処理を記述したいのですが、phpのif文の中にこういう書き方は出来ないですよね。何かいい方法あるでしょうか。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。