Chupakabra Posted May 31, 2014 Report Share Posted May 31, 2014 Sobrid esmu jau ticis tik talu ka registracija tiek izpildita un pat saglabajas datubaze Prieks manim tas jau ir daudz.Tagad vel viena maza problemina.Kads varetu pierakstit pareizo rindinu(trukstoso) on (release) { if(username.length >= 6 && pass.length >= 6){ loadVariablesNum("register.php", 0, "POST"); }else{ _root.words = "Username must have between 6 and 12 characters."; } } Seit jau taka ir skaidrs.Kods ko esmu ierkastijis poga.Pietrukst rindina lai pec si izpildisanas ja ir ok tiek izpildita komanda on (release) { _root.gotoAndPlay("freima nosaukums"); } Ka to pareizi savienot kopa?Izmantots ActionScript 2 Quote Link to comment Share on other sites More sharing options...
e-remit Posted May 31, 2014 Report Share Posted May 31, 2014 Ja tev to gotoAndPlay vajag pēc tam, kad pabeigta ielāde, tad nepieciešams kods, kas gaida ielādes beigas, kā šajā piemērā: http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00000576.html Vai tad AS2 vēl kāds lieto? Quote Link to comment Share on other sites More sharing options...
daGrevis Posted May 31, 2014 Report Share Posted May 31, 2014 > Vai tad AS2 vēl kāds lieto? Vai tad Flash vēl kāds lieto? Quote Link to comment Share on other sites More sharing options...
Chupakabra Posted June 1, 2014 Author Report Share Posted June 1, 2014 Paldies :) Un nu nevaretu teikt ka lieto vai nelieto :D Vajag vienkarsi vienu funkciju dabut :D Quote Link to comment Share on other sites More sharing options...
Chupakabra Posted June 2, 2014 Author Report Share Posted June 2, 2014 (edited) Un vel dazi jautajumi... Sobrid uzspiezot ok datubaze tiek saglabats tikai lietotaja vards un parole ka pareizi panakt to lai tiek saglabats ari limenis un speletaja "stati"? Un otrs ka pareizi ievadot login informaciju izsaukt parbaudi no datubazes pa speletaja limeni un "statiem" un atcereties izmainas?Pagaidam lietoju sadu kodu. LOGIN.PHP <?php mysql_connect("localhost","root","") or die(); mysql_select_db("datubaze") or die(); $check = mysql_query("SELECT * FROM users WHERE username = '".$_POST['username']."'")or die(); $check2 = mysql_num_rows($check); if ($check2 == 0) { print "words=User doesn't exist.&checklog=3"; die(); } while($info = mysql_fetch_array( $check )) { if ($_POST['pass'] != $info['password']) { print "words=Incorrect Password.&checklog=4"; die(); }else { print "words=You are logged in.&checklog=5"; die(); } } ?> REGISTER.PHP <?php mysql_connect("localhost","root","") or die(); mysql_select_db("datubaze") or die(); $usercheck = $_POST['username']; $check = mysql_query("SELECT username FROM users WHERE username = '$usercheck'") or die(); $check2 = mysql_num_rows($check); if ($check2 != 0) { print "words=Username already exists.&checklog=1"; die(); } $insert = "INSERT INTO users (username, password) VALUES ('".$_POST['username']."', '".$_POST['pass']."')"; $add_member = mysql_query($insert); print "words=You are registered.&checklog=2"; die(); ?> Edited June 2, 2014 by aaxc Quote Link to comment Share on other sites More sharing options...
jurchiks Posted June 2, 2014 Report Share Posted June 2, 2014 mysql_connect("localhost","root","") Awww yisss. But seriously, throw that shit out the window. Now. Quote Link to comment Share on other sites More sharing options...
Chupakabra Posted June 4, 2014 Author Report Share Posted June 4, 2014 mysql_connect("localhost","root","") Awww yisss. But seriously, throw that shit out the window. Now. Tiesam loti izpalidzeji. Tagad man ir viss skaidrs. Quote Link to comment Share on other sites More sharing options...
jurchiks Posted June 4, 2014 Report Share Posted June 4, 2014 Ar tādu kodu tev būs tonnām neparedzētu problēmu. Iesaku palasīt PHP tutoriāļus, kuri NAV 5+ gadus veci. Quote Link to comment Share on other sites More sharing options...
Chupakabra Posted June 4, 2014 Author Report Share Posted June 4, 2014 Ar tādu kodu tev būs tonnām neparedzētu problēmu. Iesaku palasīt PHP tutoriāļus, kuri NAV 5+ gadus veci. Nemsu vera. Bet vai vari palidzet ar manu jautajumu? Quote Link to comment Share on other sites More sharing options...
jurchiks Posted June 4, 2014 Report Share Posted June 4, 2014 (edited) ka pareizi panakt to lai tiek saglabats ari limenis un speletaja "stati"?Labo šo kveriju: $insert = "INSERT INTO users (username, password) VALUES ('".$_POST['username']."', '".$_POST['pass']."')"; Ja stati glabājas citā tabulā, pēc šī kverija pievieno citu, kurš saglabā status. ka pareizi ievadot login informaciju izsaukt parbaudi no datubazes pa speletaja limeni un "statiem" un atcereties izmainas?Kāda pārbaude? Kādi stati? Ko atcerēties? Edited June 4, 2014 by jurchiks 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.