jauninjais Posted May 28, 2006 Report Share Posted May 28, 2006 vai kaads var pateikt kaapeec shajaa kodaa, man peec submit pogas nospieshanas vinsh vnk izmet mani laukaa no postoshanas formas uz login formu? http://paste.php.lv/3813 Link to comment Share on other sites More sharing options...
v3rb0 Posted May 28, 2006 Report Share Posted May 28, 2006 rasola gabals. rādi citu, tur tak nekur nav pieminēta login forma, ne kā izskatās, ne kad redirectē uz login formu. Link to comment Share on other sites More sharing options...
jauninjais Posted May 28, 2006 Author Report Share Posted May 28, 2006 (edited) login forma - http://paste.php.lv/3814 http://paste.php.lv/3813 - fails, kursh apstraadaa dotos peec pareizas vai nepareizas paroles ievadiishanas Edited May 28, 2006 by jauninjais Link to comment Share on other sites More sharing options...
Klez Posted May 28, 2006 Report Share Posted May 28, 2006 (edited) if($_POST['parole'] == 'parole'){ $_SESSION['loged_in'] = true; } else{ include("admins.php"); exit; } tas jau vien ir rosola gabals .. pareizaak buutu: if($_POST['parole'] == 'parole') $_SESSION['loged_in'] = true; else{ include("login.php"); exit; } Edited May 28, 2006 by Klez Link to comment Share on other sites More sharing options...
jauninjais Posted May 28, 2006 Author Report Share Posted May 28, 2006 labi varbuut rakstiiba nav taa labaakaa, bet shajaa gadiijumaa man ir interesanti kaapeec mani atmet uz login formu peec submit pogas nospieshanas, kura ieraxta datubaazee? ja nesaprataat, tad varat apskatiities sheit: http://jauninjais.eclub.lv/admins.php (parole - parole) to datubaazes erroru nenjemiet veeraa, jo datu baazes uz taas lapas nemaz nav. ja pat man submitotos datubaazee, tad peec submit pogas nospieshanas vnk paarrefreshotos jauna_zinja2.php nevis aizietu uz admins.php neko neizdarot Link to comment Share on other sites More sharing options...
Delfins Posted May 28, 2006 Report Share Posted May 28, 2006 - Kāpēc? - Tāpēc, ka tu tā kodu uzrakstīji.. Link to comment Share on other sites More sharing options...
SkyD Posted May 28, 2006 Report Share Posted May 28, 2006 Kārtīgi sesija netiek uzlikta. Link to comment Share on other sites More sharing options...
jauninjais Posted May 28, 2006 Author Report Share Posted May 28, 2006 man, protams, patiik shitie delfiina teksti, bet vai vareetu tuvaak paskaidrot, kas man ne taa? Link to comment Share on other sites More sharing options...
SkyD Posted May 28, 2006 Report Share Posted May 28, 2006 <? session_start(); if($_POST['parole'] == 'parole'){ $_SESSION['loged_in'] = true; } else{ include("admins.php"); exit; } ?> Galīgi nepatīk man tas. Pēc pogas "ierakstiit" piespiešanas vinjsh tev atkal pārbauda, vai $_POST['parole']=='parole' ! A, ja nav, tad met uz admins.php :P~~ Link to comment Share on other sites More sharing options...
jauninjais Posted May 28, 2006 Author Report Share Posted May 28, 2006 Pēc pogas "ierakstiit" piespiešanas vinjsh tev atkal pārbauda, vai $_POST['parole']=='parole' ! A, ja nav, tad met uz admins.php :P~~ shito skaidrojumu es saprotu, bet es nesaprotu, kuraa vietaa tas tieshi kodaa ir - kuraa vietaa vinsh paarbauda vai parole ir parole otrreiz? vai tadd vinsh nepaarbauda tikai vienreiz vai parole = parole? Link to comment Share on other sites More sharing options...
john.brown Posted May 28, 2006 Report Share Posted May 28, 2006 (edited) if(isset($_POST['parole']) && $_POST['parole'] == 'parole') $_SESSION['loged_in'] = true; if($_SESSION['loged_in']) { include("admins.php"); exit; } // ... te viss prārējais ... Ja es protams, pareizi sapratu loģiku, ko gribēji panākt... :) Edited May 28, 2006 by john.brown Link to comment Share on other sites More sharing options...
Klez Posted May 28, 2006 Report Share Posted May 28, 2006 (edited) tapeec ka nospiezhot pogu "pievienot", nau taada mainiigaa $_POST['parole'] no bubu satura raadiitaaja * http://php.lv/f/index.php?showtopic=1315 (sesijas darbības princips) * http://php.lv/f/index.php?showtopic=689 * http://php.lv/f/index.php?showtopic=2279 * http://php.lv/f/index.php?showtopic=859 * http://php.lv/f/index.php?showtopic=704 * http://php.lv/f/index.php?showtopic=1642 * http://php.lv/f/index.php?showtopic=2234 Edited May 28, 2006 by Klez Link to comment Share on other sites More sharing options...
Recommended Posts