Hello there,
I am too new to try to figure out what I did wrong on this script. The idea was to check if the user was logged in, if they were the script would print a welcome message displaying the first name of the user, if they were not logged in the script would print the login form. Any assistance is appreciated:
<?php
//Start session
session_start();
//Check whether the session variable SESS_MEMBER_ID is present or not
if(!isset($_SESSION['SESS_MEMBER_ID']) {
print "Welcome <?php echo $_SESSION['SESS_FIRST_NAME'];?>.<br>You are logged in.<br><br>To view your account page, <a href="member-index.php" onmouseover="window.status='';return true">click here</a>"
}
else
{
(trim($_SESSION['SESS_MEMBER_ID']) == ''))
print("<font size="2" face="Verdana, Arial, Helvetica, sans-serif">User Name:
</font><font size="2" face="Verdana, Arial, Helvetica, sans-serif"></font><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><br>
<form id="loginForm" name="loginForm" method="post" action="login-exec.php">
<input name="login" type="text" class="textfield" id="login" /><br>
<font size="2" face="Verdana, Arial, Helvetica, sans-serif">Password:</font>
<input name="password" type="password" class="textfield" id="password" />
<input type="submit" name="Submit" value="Login" />
</font>");
exit();
}
?>