Jump to content
php.lv forumi

php login


ziedinjsh

Recommended Posts

header problēma ir novērsta, bet vēljoprojām nevaru sparast par šo:

 

if (user) {
echo 'kautkas';
}
else {
header("Location: index.php");
}

 

doma ir tāda index.php failā:

if (guest) {
echo 'Tad rādas tikai logina formas';
include "login.php";
}

if (memmber) {
echo 'rādas lapas saturs';
}

 

bet man kaut kā neizdodas neko tādu izveidot.. jo login.php ieiešanu kontrolē cookie un ar viņiem es esmu uz Jūs

Link to comment
Share on other sites

Nu - guest, tas nozīmē, ka nav ielogojies, member - tajā gadījumā, ja ir ielogojies.

Tavā kodā jau ir (ja visas problēmas novērstas) tas aptuveni realizēts:

//then redirect them to the members area

header("Location: http://62.63.191.54/");

 

 

Tātad tā redirekta vietā vienkārši ieliec to "memberiem" domāto saturu.

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