Hello All,
Please can somone help with my I am getting:
Fatal error: Call to undefined function strtlower() in /home/tayo/public_html/session.php on line 44
I have indicated my line 44 with a comment. Thanks
Here is my code
Please can somone help with my I am getting:
Fatal error: Call to undefined function strtlower() in /home/tayo/public_html/session.php on line 44
I have indicated my line 44 with a comment. Thanks
Here is my code
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"[/URL] xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title> session form </title>
<style type="text/css" media="screen">.number {font-weight: bold;} </style>
</head>
<body>
<form action="session.php" method="post">
<p> Username <input type="text"
name="username" size="20" /></p>
<p> Password <input type="text"
name="password" size="20" /></p>
<p> Please log in <input type="submit"
name="submit" value= "log In" /></p>
<input type="hidden" name="submitted"
value="true" />
<h1> LOG IN FORM </h1>
</form>
<?php
/* This script takes values from above and use them in the function below. */
//Set the page title
define('TITLE', 'Login');
//recquire('[URL unfurl="true"]http://student.codelesson.com/~tayo/index.php')[/URL]
require('templates/header.html');
//into text
//Print'<h1> Login form</h>
//<p> Please login use in </p>';
//Check if the form has been submitted
if(isset ($_POST['submitted'])){
//handle form
if((!empty($_POST['username'])) && (!empty ($_POST['password']))){
if((strtlower($_POST['username'])=='james') && ($_POST['password']=='mailman')){///this is line 44
//Do something here
sesstion_start();
$_SESSION['username'] =$_POST['username'];
$_SESSION['loggedin']=time();
///tell the user to the web page
ob_end_clean();
heaader('[URL unfurl="true"]http://local.codelesson.com/~james/index.php');[/URL]
exit();
}
else
{
print'<p> Username and Password not mactched the record</p>';
}
}
else {
Print'<p> Please enter Username and Password </p>';
}
}else {//Display form
print '<form action="session.php" method="post">
<input type="hidden" name="submitted" value="true" />
</form>';
}
require('templates/footer.html');
?>
</body>
</html>