[Dev]New Dark&Red Flyff CMS!^^ & need help

Code:
<form name="account_l" method="post" action="login.php">
This will send the account information to the php document called 'login.php' on the same server.

In that PHP you should then set it up to receive the password-

Code:
$username = $_POST ['username']

This will then set the variable $username to whatever the user entered as the username. You should change the ['username'] whatever the field the user is entering data into is called.

You should also change the variable name as appropriate.

For example, if you wanted to do the same for a password

Code:
 $password = $_POST ['password']

From here, you can then use those variables to determine whether the information is in the database. For the admin panel, I would use a similar system, and also use PHP to check the users access level. If the access level is 1000, it will log them in, if not it will error.
 
ahhhh someone needs to make a user panel that has manuall rebirth

and a ranks page with rebirth count on it

i really need one and i cant code it myself

anyone help ??
 
<?php


/* Unset all Cookies on Logout */


if(isset($_POST['logout']))
{
setcookie('uid', '', time() - 86400);
setcookie('dispchar', '', time() - 86400);
setcookie('slotleft', '', time() - 86400);
$page = $_GET['page'];if($page!='login') { header('Location: ?page='.$page); }
else { header('Location: ?page=home'); }

}include'config.php';include'src/gzip_header.php';




/* Unset cookies if main cookie expires */

if(!isset($_COOKIE['uid'])) { setcookie('dispchar', '', time() - 86400); setcookie('slotleft', '', time() - 86400); }


/* Set main cookie after register */


if($_GET['loginreg']) { setcookie('uid', $_GET['uid'], time() + 900); header('Location: ?page=login'); }



/* Set current character slot *



/if($_GET['slot']) { setcookie('uid', $_COOKIE['uid'], time() + 900); setcookie('dispchar', $_GET['slot']); header('Location: ?page=login'); }




/* Reset Position Process */


if($_GET['act']=='resetpos')
{
$user = $_COOKIE['uid'];
$charslot = $_COOKIE['dispchar'] - 1;
$resetpos = mysql_query("update characters set posx='6960', posy='100', posz='3317', posworldid='1' where accountname='$user' and charslot='$charslot'"); header('Location: ?page=login');}




/* Buffer System Process */


if($_GET['page']=='ok'){

$user = $_COOKIE['uid'];
$charslot = $_COOKIE['dispchar'] - 1;
$chk = 148;
while ($chk > 19){
if(!$_GET[$chk]){ $chk = $chk - 1; }
else {
$skillid = $_GET[$chk];
$chkdata = mysql_query("select skillid from buffs where charid=(select id from characters where accountname='$user' and charslot='$charslot') and skillid='$skillid'");
$chkdata = mysql_fetch_row($chkdata); if(($chk>113&&$chk<117)||($chk>48&&$chk<51)||($chk==53)||($chk==20)||($chk==26)) $sklvl = 20;
if($chk>145&&$chk<149) $sklvl = 10;
$ability_type = mysql_query("select dwDestParam1 from data_skills where dwName='$chk' and dwSkillLvl='$sklvl'"); $ability = mysql_query("select dwAdjParamVal1 from data_skills where dwName='$chk' and dwSkillLvl='$sklvl'"); $ability_type = mysql_fetch_array($ability_type);
$ability = mysql_fetch_array($ability);
$ability_type = $ability_type["dwDestParam1"];
$ability = $ability["dwAdjParamVal1"];
if(!$chkdata){ $addbuff = mysql_query("insert into buffs (charid, skillid, skilllvl, abilityType1, ability1, remainingTime) values ((select id from characters where accountname='$user' and charslot='$charslot'), '$skillid', '$sklvl', '$ability_type', '$ability', '$buff_time')");
} else {
$addbuff = mysql_query("update buffs set remainingTime='$buff_time' where skillid='$skillid' and charid=(select id from characters where accountname='$user' and charslot='$charslot)"); }

$chk = $chk - 1;
}
}
header('Location: ?page=login');
}

/* Login Process */

if(isset($_POST['login'])){
$pass = md5('kikugalanet'.$_POST['password']);
$user = addslashes($_POST['username']); $query = mysql_query("select * from accounts where username='$user'");
$query = mysql_fetch_array($query);
if(!$query){ $errmes = 'Unregistered Account.'; }
else {
$query = $query["password"];
if($query!=$pass){ $errmes = 'Wrong Password'; }
else
{
$query = "select * from characters where accountname='$user'";
$charCount = mysql_num_rows(mysql_query($query));
if($charCount > 1) {
$chkCharSlot = mysql_fetch_array(mysql_query("select * from characters where accountname='$user' and charslot='0'")); if(!$chkCharSlot) { setcookie('dispchar', 2); }
else { setcookie('dispchar', 1); setcookie('slotleft', 1); } } else {
$chkCharSlot = mysql_fetch_array(mysql_query("select * from characters where accountname='$user'"));
$chkCharSlot = $chkCharSlot["charslot"] + 1;
setcookie('dispchar', $chkCharSlot);
}
setcookie('uid', $user, time() + 900);
$passvar = 'Location: ?page=login';
header($passvar); } }}

?>

Is you Header Php ?
 
Back