wayfarer Posted November 8, 2009 Report Share Posted November 8, 2009 (edited) Sadomāju uzrakstīt sesijas pārbaudi, lai nevar tikt iekšā pa tiešo :) bet ar to gāja/iet raibi. Variants Nr.1 <?php session_start(); if (!session_is_registered("username")){ header("../index.php"); } ?> Viss Ok, mierīgi tiek iekšā ja zin ceļu... Variants Nr.2 <?php session_start(); $_SESSION['username'] == $username; header ("location: ../index.php"); ?> Netieku pats klāt ar paroli un user...:) Palīdziet kāds atrast kļūdu ! Edited November 8, 2009 by wayfarer Quote Link to comment Share on other sites More sharing options...
briedis Posted November 8, 2009 Report Share Posted November 8, 2009 Pastāsti saviem vārdiem, ko gribi panākt? :) Quote Link to comment Share on other sites More sharing options...
wayfarer Posted November 8, 2009 Author Report Share Posted November 8, 2009 Pastāsti saviem vārdiem, ko gribi panākt? :) Lai izlogojoties no lapas tajā būtu iespējams tikt atpakaļ tikai ar user un pass. Nevis ar back taustiņu. Quote Link to comment Share on other sites More sharing options...
wayfarer Posted November 8, 2009 Author Report Share Posted November 8, 2009 vai arī lai novērstu iespēju tikt lapā ja zin ceļu (www.manalapa/foledris/tram/pam/index.php) Quote Link to comment Share on other sites More sharing options...
briedis Posted November 8, 2009 Report Share Posted November 8, 2009 vai arī lai novērstu iespēju tikt lapā ja zin ceļu (www.manalapa/foledris/tram/pam/index.php) Nu kā, www.manalapa/foledris/tram/pam/index.php augšā ieliec start_session(); if(!$_SESSION['logged_in']){ header("Location:log_in.php"); } Nu kaut tā... Quote Link to comment Share on other sites More sharing options...
waplet Posted November 8, 2009 Report Share Posted November 8, 2009 session_destroy(); $_SESSION['user'] = NULL; Quote Link to comment Share on other sites More sharing options...
waplet Posted November 8, 2009 Report Share Posted November 8, 2009 vai arī ar htaccess Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted November 8, 2009 Report Share Posted November 8, 2009 if(!logged_in()) { header("Location: unauth.php"); } Kur f-ja logged_in() atgriež vai lietotājs ir iežurnalējies vai nav. Kā to darīt? Nu tas tev pašam būtu jāzin, ja veidoji iežurnalēšanās sistēmu. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.