Chupakabra Posted September 21, 2014 Report Share Posted September 21, 2014 (edited) Sveiki visiem. Kads nevaretu palidzet ar to ka pareizi japieraksta login faila sesijas un cepumi ta lai tie abi stradatu kopa? Pats kods sobrid ir : <?php require_once('scripts/mysqlconnector.php'); $user = $_GET['user']; $pass = $_GET['pass']; $result=mysql_query("SELECT * FROM account WHERE user = '$user' AND pass = '$pass'"); if(mysql_num_rows($result) == 0){ $login = "&err=Login Failed."; echo($login); } else { $row = mysql_fetch_array($result); $user=$row['user']; $pass=$row['pass']; $login = "&user=" . $user . "&pass=" . $pass . "&err=Login Successful."; echo($login); } ?> Edited September 21, 2014 by Chupakabra Quote Link to comment Share on other sites More sharing options...
Code Posted September 21, 2014 Report Share Posted September 21, 2014 Izdzēs to kodu un sāc lasīt grāmatas par PHP pamatiem. Tas ko Tu tur raksti ir kaut kāds DB administrēšanas rīks. Quote Link to comment Share on other sites More sharing options...
Chupakabra Posted September 21, 2014 Author Report Share Posted September 21, 2014 Paldies par viedokli.:D Ar so php kodu sadarbojas Flash. Un tas nav nekads tev db administresanas riks. Quote Link to comment Share on other sites More sharing options...
codez Posted September 21, 2014 Report Share Posted September 21, 2014 Zini kāpēc sensenos laikos aizliedza buršanos? Tāpēc, ka bija "burvji", kas zināja buramvārdus, bet nezināja īsti to nozīmi un kā tas strādā (patiesībā viņiem nebija ne mazākās sajēgas par to) un bieži sanāca daudz ziepes. Skaties, ka, dēļ tādiem kā tu, neaizliedz programmēšanu. Quote Link to comment Share on other sites More sharing options...
Chupakabra Posted September 21, 2014 Author Report Share Posted September 21, 2014 Paldies par palidzibu.Problema veiksmigi atrisinata ari bez jusu divu aspratibam.Bet ko gan citu vareja gaidit :D 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.