13.11.2011, 05:43
Ok, this is the story:
1. I used an Tkadmin filterscript
2. I want make an registration system, (the register would be on the website like register.php)
3. I have done make the registration system (like form & the php code)
4. Get a little prob.
registerform.php
register.php
Registration system working great, I check the database.
See the picture
But when i try to login in game, theres a problem that say i not registered.
Im not registered on the website too
I see that i must set the Logged variable to 1.
how i can add the Logged variable on the register.php
Like:
but above is only for pawn.exe
need help, what i must to do?
1. I used an Tkadmin filterscript
2. I want make an registration system, (the register would be on the website like register.php)
3. I have done make the registration system (like form & the php code)
4. Get a little prob.
registerform.php
Код HTML:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>register</title> </head> <body bgcolor="black" style="color:white;"> <FORM ACTION="register.php" METHOD=get> <h1>welcome to the registration page</h1> please input the registration details to create an account here<br> <table border="2"> <tr> <td>User Name :</td><td><input name="regname" type="text" size"20"></input></td> </tr> <tr> <td>email :</td><td><input name="regemail" type="text" size"20"></input></td> </tr> <tr> <td>password :</td><td><input name="regpass1" type="password" size"20"></input></td> </tr> <tr> <td>retype password :</td><td><input name="regpass2" type="password" size"20"></input></td> </tr> </table> <input type="submit" value="register me!"></input> </FORM> </body> </html>
PHP код:
<?php
session_start();session_destroy();
session_start();
if($_GET["regname"] && $_GET["regemail"] && $_GET["regpass1"] && $_GET["regpass2"] )
{
if($_GET["regpass1"]==$_GET["regpass2"])
{
$servername="localhost";
$username="root";
$conn= mysql_connect($servername,$username)or die(mysql_error());
mysql_select_db("sa-mp",$conn);
$sql="insert into playerinfo (user,password,kills,deaths,score,money,IP,adminlvl,email)values('$_GET[regname]','$_GET[regpass1]','0','0','0','0','0','0','$_GET[regemail]')";
$result=mysql_query($sql,$conn) or die(mysql_error());
print "<h1>you have registered sucessfully</h1>";
$_SESSION['Logged']=1;
print "<a href='index.php'>go to login page</a>";
}
else print "passwords doesnt match";
}
else print"invaild input data";
?>
See the picture
But when i try to login in game, theres a problem that say i not registered.
Im not registered on the website too
I see that i must set the Logged variable to 1.
how i can add the Logged variable on the register.php
Like:
Код:
SetPVarInt(playerid, "Logged", 1);
need help, what i must to do?
