FT3 Posted February 9, 2010 Report Share Posted February 9, 2010 (edited) Labdien te tada lieta , vjg dabut php login scriptu kurš strada uz sessiam piemers : Login : input laucinš Passsword : input laucinš ja tu esi veiksmigi ielogojies ņem informaciju no mysql datubazes un rada profila informaciju ! p.s. mekleju foruma nek0 tadu neatrdau ;/ ļoti ļoti vjg šo scriptu , iepriekš paldies ;) Edited February 9, 2010 by FT3 Quote Link to comment Share on other sites More sharing options...
bobsters Posted February 9, 2010 Report Share Posted February 9, 2010 pamekle citigak! Google ir pilna ar sada veida login scriptiem Quote Link to comment Share on other sites More sharing options...
FT3 Posted February 9, 2010 Author Report Share Posted February 9, 2010 mekleju ari g0ogle.lv ir kaukadi scripti , bet nevaru viņus adopdet ;/ Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted February 9, 2010 Report Share Posted February 9, 2010 Lai varetu to 'adoptet' vajag kaut ko ari no ta saprast...nebuus viss tik vienkaarshi kaa copy/paste... Quote Link to comment Share on other sites More sharing options...
FT3 Posted February 9, 2010 Author Report Share Posted February 9, 2010 es sapr0ta , ne l0ti labi bet nu pietiekami ;] Quote Link to comment Share on other sites More sharing options...
eT` Posted February 9, 2010 Report Share Posted February 9, 2010 pie login formās kad viss ir ok uzliec $_SESSION["useris"] = $pieskiram_kkadu_mainigo_piemeram_id faila sākumā session_start(); ( šito vajag visos failos ) tālāk piem jaunsfails.php session_start(); if(isset($_SESSION["useris"])) { rādam lapu un velkam spiežam stumjam } else { nogalinam un slēpjam pierādījumus } Quote Link to comment Share on other sites More sharing options...
2easy Posted February 9, 2010 Report Share Posted February 9, 2010 (edited) woow vēl nesen tieši šito mācīju eT`, un tgd jau viņš pats māca tālāk. forši! super!!! :)) btw, ierakstīju googlē "php login" un tajos rezultātos ir arī skripti ar aprakstiem, kas visu paskaidro (vismaz cenšas izskaidrot :D) Edited February 9, 2010 by 2easy Quote Link to comment Share on other sites More sharing options...
bobsters Posted February 9, 2010 Report Share Posted February 9, 2010 (edited) <form action="" method="post"> Vards:<input type=text name=nicks> Parole: <input type="password" name=parole> <input type=submit value=Ielogoties name=login> <? if ($login){ $con=mysql_connect('localhost','xxx','xxxx'); mysql_selectdb('test',$con); $logins=$_POST['nicks']; $pswd=$_POST['parole']; $q="select * from login WHERE nickname='$logins' and passwd='$pswd'" or die (mysql_error()); $data=mysql_query($q); $showdata=mysql_fetch_assoc($data); if($pswd==$showdata["passwd"] && $logins==$showdata["nickname"]){ session_start(); $_SESSION["username"]=$logins; echo "esam ielogojusies"; } else echo "Ielogosanas nav izdevusies"; } attiecigi ja gribam hasotas paroles tad mazliet japamaina kodins dazas vietas japievienot md5() un attiecigi ari datubaze ievietojot paroli vajag nohashot P.S. Ka izlogoties no sesijam cerams zinasi :) Edited February 9, 2010 by bobsters Quote Link to comment Share on other sites More sharing options...
eT` Posted February 10, 2010 Report Share Posted February 10, 2010 (edited) bet ja nu nezini, tad: <? if(isset($_GET["action"]) && $_GET["action"] == "iziet") { session_destroy(); //pārmetam uz sākuma lapu } ?> <a href="?action=logout>IZIET</a> Edited February 10, 2010 by eT` Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted February 10, 2010 Report Share Posted February 10, 2010 OMGROFLMAOLOL! Kr4 tEW waig kkur t3 p/\$katiities: http://php.lv/f/topic/2935-neliels-foruma-temu-apkopojums-no-arhiva-sadalas/ Tur viena no ir: logini/autorizācijas (arī sesijas) Quote Link to comment Share on other sites More sharing options...
2easy Posted February 10, 2010 Report Share Posted February 10, 2010 labs stiliņš Aleksej ^^ kā man patīk, kad cilvēkam atbild viņam saprotamā valodā! :D:D:D Quote Link to comment Share on other sites More sharing options...
EdgarsK Posted February 10, 2010 Report Share Posted February 10, 2010 labs stiliņš Aleksej ^^ kā man patīk, kad cilvēkam atbild viņam saprotamā valodā! :D:D:D piekritu. vispar varetu php.lv/f sadalit 2 daljas 1) ask your question if your know what your asking 2) oposite to the first option 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.