Hi, i am wanting to add sessions to my site so people cant save a page inside the members area..
(and im wanting the page to expire so they have to login again)
Can anyone help me add the sessions feature into this???
(PS. If you dont notice, This is a WAP site not WE😎
Login.php
<?header("Content-type: text/vnd.wap.wml")
;echo '<?xml version="1.0"?>';?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Login" newcontext="true">
<p align="center">
Username:
<input name="username" size="10" />
<br/>
Password:
<input name="password" size="10" type="password" />
<br/>
<anchor>
:Login:
<go href="enter.php?user=$(username)&pass=$(password)" method="post" accept-charset="unknown">
<postfield name="username" value="$(username)"/>
<postfield name="password" value="$(password)"/>
</go>
</anchor>
</p>
</card>
</wml>
Enter.php
<?header("Content-type: text/vnd.wap.wml")
;echo '<?xml version="1.0"?>';?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="login" newcontext="true">
<p align="center">
<?
require("config.php");
include("usercount.php");
mysql_connect($server,$user,$pass);
mysql_select_db($dbname);
$sql = mysql_query("SELECT * FROM login WHERE pass='$password' AND user='$username' ")
or die(mysql_error());
if (mysql_numrows($sql)) {
$var = mysql_fetch_array($sql);
if ($var["pass"] == $password && $var["user"] == $username) {
echo "Welcome ".$var["user"]." ";
echo "<br/><a title=\"Enter\" href=\"../wapindex.wml\">Enter Here</a><br/>\n";
countUserOnline(&$CountUser);
echo "Members Online:".$CountUser."<br/>";
} else {
echo "Incorrect Login<br/>Please Login Correctly<br/><a title=\"Login\" href=\"login.php\">Here</a><br/>\n";
}
} else {
echo "You are not in our database<br/>Please Register<br/><a title=\"Register\" href=\"apply.php\">Here</a><br/>\n";
}
?>
</p>
</card>
</wml>