Jump to content
php.lv forumi

IPB login


anonīms

Recommended Posts

tur iecep tīri ID :D

Ok, laikam atradu

pass_hash

Tagad derētu iegūt kkur kā veic pārbaudi, ko prāta darbs nebūtu līst iekšā forumā un skatīties katru failu.

P.S. Te tak bija tik daudzi ar IPB loginiem?

WHERE = ARE order by YOU

?

Link to comment
Share on other sites

$get = mysql_query("SELECT * FROM `ibf_members` WHERE id='".intval($_COOKIE['member_id'])."'") or die(mysql_error());
$udata = mysql_fetch_object($get);
if($udata->member_login_key == $_COOKIE['pass_hash']) {
//logged
} else {
//login_form
}

?

Link to comment
Share on other sites

Man ir error un nezinu kā sataisīt tādu lietu!

Heder alredi send tas tāpēc ka man ir heder redirect, bet kā var to izdarīt savādāk?

<?
mysql_connect("localhost", "admin", "")or die('<pre></p>');
mysql_select_db("db")or die('<pre></p>');
$get = mysql_query("SELECT * FROM `ibf_members` WHERE id='".intval($_COOKIE['member_id'])."'") or die(mysql_error());
$udata = mysql_fetch_object($get);
if($udata->member_login_key == $_COOKIE['pass_hash']) {
//logged
} else {
header('Location: http://www.tavalapa.lv/login.php/');
}
?>

Un man ir login skripts ja piemēram nav ielogojies tas nozīmē tev nav cepumi saglabāti un tevi redirect uz login.php

Zinu ka esmu uzbāzīgs, bet kā savādāk iemācīsies ja kāds skolotājs nelabos kļūdas! :)

Link to comment
Share on other sites

Cepums tev! Ka piespiedi apskatīt un izlasīt tagad zinu ka heder alredy sent nozīmē ka html sāk savu darbu un neļauj php un heder uzsākt savu darbu un viņam ir jābūt lapas pašā sakumā!

 

Un piemēram cilvēks joka pēc grib apskatīt login.php kas jau ir ielogjies. Kā uzlikt lai viņu redirektē uz index.php

 

<?
mysql_connect("localhost", "lockerz", "")or die('<pre></p>');
mysql_select_db("db")or die('<pre></p>');
$get = mysql_query("SELECT * FROM `ibf_members` WHERE id='".intval($_COOKIE['member_id'])."'") or die(mysql_error());
$udata = mysql_fetch_object($get);
if($udata->member_login_key == $_COOKIE['pass_hash']) {
//logged
} else {
header('Location: http://www.lockerz.hostplex.lv/login.php/');
} else {('Location: http://www.lockerz.hostplex.lv');
}
?>

Edited by Snaip3Rs
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...