I am getting a problem...when i post the form, i get this as fatal error...
Call to undefined function session_register()...
i changed it with $_session(),but still it is not working..

can you tell me what is the problem??





This is the index.html page.


<form class="login active" method="post" action="login.php">
<h3>Login</h3>
<div>
<label>Username:</label>
<input type="text" name="myusername"/>
<span class="error">This is an error</span>
</div>
<div>
<label>Password:</label>
<input type="password" name="mypassword" />
<span class="error">This is an error</span>
</div>
<div class="bottom">
<div class="remember"><input type="checkbox" /><span>Keep me logged in</span></div>
<input type="submit" value="Login"></input>
<div class="clear"></div>
</div>
</form>




This is the login.php page..



<?php
$host="localhost";
$username="root";
$password="";
$db_name="Example";
$tbl_name="login";

mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");

$myusername=$_POST['myusername'];
$mypassword=$_POST['mypassword'];

$myusername = stripslashes($myusername);
$mypassword = stripslashes($mypassword);
$myusername = mysql_real_escape_string($myusername);
$mypassword = mysql_real_escape_string($mypassword);
$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'";
$result=mysql_query($sql);

$count=mysql_num_rows($result);

if($count>0){

session_register("$myusername");
session_register("$mypassword");
header("location:welcome.php");
}
else {
echo "Wrong Username or Password!";
}
?>

Thi is welcome.php page..

<?php
session_start();
if(!session_is_registered(myusername)){
header("location:index.html");
}
?>

<html>
<body>
Login Successful
</body>
</html>