0

Im a novice at php and cant seem to get the following two line together.

We want to use this line

<?php if($logged_in) { echo "Welcome back, $logged_row[username]&nbsp"; } else {

print('<a href="http://xxx/login.html">Login</a> / <a href="http://xxx.com/signup.html">Signup</a>');

} ?>

But we need this put into it, we need it before the else statement.

<a href="<?= $_SERVER["REQUEST_URI"] . '&amp;action=logout' ?>"><?= $lang['ACC_LOGOUT'] ?></a>

Any help would be greatly appreciated.

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by valonesal
0
<?php 
if($logged_in) { 
  echo "Welcome back, $logged_row[username]&nbsp"; 
 ?>
<a href="<?= $_SERVER["REQUEST_URI"] . '&amp;action=logout' ?>"><?= $lang['ACC_LOGOUT'] ?></a>
<?php
} 
else {
 print('<a href="http://xxx/login.html">Login</a> / <a href="http://xxx.com/signup.html">Signup</a>');
} 
?>

Edited by hielo: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.