I plan to use an Icon Button control on a website. It will be a "Log In" and "Log Out" named button. The name used will be selected by
Code: Select all
<?php
session_start();
// Check if the user is logged in
if (isset($_SESSION['user_Name'])) {
$welcome_message = "Welcome back, " . htmlspecialchars($_SESSION['user_Name']);
$myLogValue="Log Out";
} else {
$welcome_message = "Welcome, you are signed in as a Guest";
$myLogValue="Log In";
}
?>
- I need to link two different events to this button... "LogIn.php" and "Logout.php". How can I make these links?
- The icon used will be different, of course. a Log in icon and a Log Out icon.
- Lastly, can I manage the colour of the icon in this control? The default seems to be white, and that colour will be too weak.
