Jump to content
php.lv forumi

Problēma ar Loginu!


DJEdja

Recommended Posts

Sveiki man ir tāda problēma ka mēģīnu apvienot HTML lapu ar IPB loginu itkā visu saliku un lieta tāda ka caur Lapu loginojoties viņš visu izdara iemet IPB bet kad piespiežu pogu lai ieiet Lapā viņš iemet tā itkā es nebūtu ielogonojies! Bet ja es uztaisu Loginu caur IPB un tad ieeju Lapā tad viss iet normāli!

Izmantoju lūk šo scriptu :

<?php
mysql_connect("localhost", "root", "******");
mysql_select_db("forums");
if(isset($_COOKIE['member_id'])){
$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']) {
echo "
<center>Sveiks ".$udata->members_display_name."</center><br> 
<a href= 'f/index.php?act=UserCP&CODE=00'>Edit Profile</a><br>
<a href= 'f/index.php?act=Members'>Users</a><br>
<a href= 'f/index.php?act=Search&f=0'>Search at forum</a><br><br>
<a href= 'f/index.php?act=Login&CODE=03&k=5ed3ccfb59c53e0aeba3d22aa0f4bdd5'>Exit</a>";
}else{
echo "
<form action='http://127.0.0.1/f/index.php?act=Login&CODE=01' method='post' name='theform'>
<div align='left'><font size='1' face='Arial, Helvetica, sans-serif'>Username
<input style='width: 124px;' name='UserName' type='text'>
<br>
Password</font>
<input style='width: 124px;' name='PassWord' type='password'>
<br>
<input name='submit' type='submit' class='submit' value='Login'>
</div>
</form>
";
}
}else{
echo "
<form action='http://127.0.0.1/f/index.php?act=Login&CODE=01' method='post' name='theform'>
<div align='left'><font size='1' face='Arial, Helvetica, sans-serif'>Username
<input style='width: 124px;' name='UserName' type='text'>
<br>
Password</font>
<input style='width: 124px;' name='PassWord' type='password'>
<br>
<input name='submit' type='submit' class='submit' value='Login'>
</div>
</form>
";
}
?>

Link to comment
Share on other sites

a nē viss tiku galā! ;)

em man tgd cits jautājums : kā varēja inclūdot failu iekšā html lapā ??

Nu piemēram to pašu login.php failu! Liekas ka kautkas bija <?include ("login.php") kautkā tā bet nesanāk un īšti neatceros vai tā bija pareizi! :)

Link to comment
Share on other sites

a nē viss tiku galā! ;)

em man tgd cits jautājums : kā varēja inclūdot failu iekšā html lapā ??

Nu piemēram to pašu login.php failu! Liekas ka kautkas bija <?include ("login.php") kautkā tā bet nesanāk un īšti neatceros vai tā bija pareizi! :)

 

Em, HTML failā nevar include'ot neko, jo tas ir HTML fails.

<?php include 'fails.html';

...ir PHP skripts, ko HTML nevar izpildīt... :)

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...