ok pt2.. here we go.. lol
right.. now i've succed out my login script, thanx to a few of you guys.. 🙂 i now have another problem!
when some1 logs into my site through the form on my login.wml page
this is it >>
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<template>
<do type="prev">
<prev/>
</do>
</template>
<card id="card1" title="Login" newcontext="true">
<p align="center">
Username:
<input name="username" size="15" />
<br/>
Password:
<input name="password" type="password" />
<br/>
<do type="Send" label="Send">
<go href="login.php" method="post" accept-charset="unknown">
<postfield name="username" value="$(username)"/>
<postfield name="password" value="$(password)"/>
</go>
</do>
</p>
</card>
</wml>
it then gets checked against my DB and goes to login.php (as you see above) which is this >>
<?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");
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["uname"]." ";
} else {
echo "Incorrect Login";
}
} else {
echo"You are not in database<br><a href=register.wml>Register</a> ";
}
?>
</p>
</card>
</wml>
as you will of gathered.. it just shows welcome at the moment.. BUT!!
my question is.. how can i stop ppl bookmarking that page and goin to it some other time and escape from loggin in??
ive seen on other sites a id number like this >>
/index.php?id=ab36496bsrdi which produces a random id everytime you login,
and if you try enter it again it says session expired or some thing along those lines....
what do i need to do to get this????
pls remember im buildin a WAP site not WEB
Thanx 🙂