Hi,
Below is the code I am having difficulty making work:
public function showLoginOut() {
if (session==null)
{
return '<li><a href="login.php">Login</a></li>';
}
else
{
return '<li><a href"logout.php">Logout</a></li>';
}
}
*^ Above is a PHP page, which holds functions I can use in a phtml document*
<ul>
<li><a href="index.php">Home</a></li>
<?php
function showLoginOut() {
};
?>
<li><a href="allstock.php">All Our Stock</a></li>
.....
* ^ Above is part of the phtml page.*
When I run the page there are no errors shown, but in the list there's no Login or Logout. I don't know why. I've tried echo instead of return, but the same thing happens. Any help would be greatly appriciated.
Thank you.