Call to undefined function session_register()

Codes here !

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 2
Joined: Fri Dec 07, 2012 1:42 am

Call to undefined function session_register()

Postby prashantminku » Mon Dec 10, 2012 12:05 am

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">
<input type="text" name="myusername"/>
<span class="error">This is an error</span>
<input type="password" name="mypassword" />
<span class="error">This is an error</span>
<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>

This is the login.php page..


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


$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'";



else {
echo "Wrong Username or Password!";

Thi is welcome.php page..


Login Successful

Return to “mySQL & php coding”

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest