Basically I just want it to login and go to a main.php where I will later set up a control panel for the individual user. For now I just want it to say Hi "usersfirstname" and then post a logout option. Right now In my main.php I get the following errors
Warning: main(login_success.php): failed to open stream: No such file or directory in /home/i4boredo/public_html/main.php on line 8
Warning: main(login_success.php): failed to open stream: No such file or directory in /home/i4boredo/public_html/main.php on line 8
Warning: main(): Failed opening 'login_success.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/i4boredo/public_html/main.php on line 8
login.php
Code: Select all
<?php require("header.php"); ?>
<center>
<br><b>User Login</b><br>
<FORM ACTION="main.php" METHOD="post" name="loginform">
<DIV ALIGN="justify">
<TABLE WIDTH="50%" BORDER="0" ALIGN="center" CELLPADDING="4" CELLSPACING="0" align="center">
<TR>
<TD WIDTH="22%">E-Mail Address</TD>
<TD WIDTH="78%"><INPUT name="email_address" TYPE="email_address" id="email_address"></TD>
</TR>
<TR>
<TD>Password</TD>
<TD><INPUT name="password" TYPE="password" id="password"></TD>
</TR>
<TR>
<TD> </TD>
<TD><INPUT TYPE="submit" name="Submit" VALUE="Submit"></TD>
</TR>
</TABLE>
</center>
</DIV>
</FORM>
</BODY>
</HTML>Code: Select all
<?
/* start the session */
session_start();
# error handler, if userid is blank, make them sign in
if ( empty( $userid ) ) {
print "Please login below!";
include 'login.php';
} else {
include 'db.php';
/* this prints at the top of the page. */
echo "Welcome, ". $_SESSION['first_name'] .". You are now in our exclusive 'Members Only' section.<br>";
/* always prints the logout page, just in case the user is done */
echo "<br><br><br><b><a href=logout.php>Logout</a><br>";
print "<br><br><br><br>";
?>Code: Select all
<?php
session_start();
if(!isset($_REQUEST['logmeout'])){
session_unset();
session_destroy();
if(!session_is_registered('userid')){
echo "<center><font color=red><strong>You are now logged out!</strong></font></center><br />";
echo "<center><strong>Login:</strong></center><br />";
include 'login.php';
}
}
?>Code: Select all
<?php require("header.php"); ?>
Search coming soon...
<?php
include 'login_success.php';
?>
</td></tr>
</table>
</center>
</body>
</html>