Marks Posted November 16, 2008 Report Share Posted November 16, 2008 <? $paldies= 'Paldies kad iegadajies'; $kods= 'Tavs kods '; $simbols= ': '; //рis мenerз kodu $r1=rand(0,9); $r2=rand(0,9); $r3=rand(0,9); $r4=rand(0,9); $r5=rand(0,9); $r6=rand(0,9); $randcode="$r1$r2$r3$r4$r5$r6"; //рis nosыtas sms sыtоtвjam echo $paldies,$kods,$simbols,$randcode; //piekonektejas mysql $con = mysql_connect("localhost","root","*********"); if (!$con) { die('Could not connect: ' . mysql_error()); } //izvelas datubazi, kur saglabasies kods mysql_select_db("code", $con); //ievada datubaze kodu mysql_query("INSERT INTO code (code) VALUES ('$randcode')"); mysql_close($con); ?> Problēma ir tāda kad kods nesaglabājas datubāzē kā to var izlabot ? Jau iepriekš Paldies! Link to comment Share on other sites More sharing options...
ry. Posted November 16, 2008 Report Share Posted November 16, 2008 Nekādu eroru nemet? itkā vis ok Link to comment Share on other sites More sharing options...
Marks Posted November 16, 2008 Author Report Share Posted November 16, 2008 ieej mana majaslapa http://2files.oo.lv ievadi jeb kadu kodu izmet tur error tas ir viens! bet otrs es 2 reizes pasutiju un nekas nesanaca nu drizak draugs pasutija bet kods nesaglabajas un tapec vins nevareja ieka4at to failu bet varbut varetu pateikt skype es tev paraditu un varbut palidzetu Link to comment Share on other sites More sharing options...
ry. Posted November 16, 2008 Report Share Posted November 16, 2008 (edited) Tev tur 3 mapes, kurā lai iet? P.s forši kāds manu sms shopu izdrāzis un nopizģījis. Kur viņu rāvi? Edited November 16, 2008 by ry. Link to comment Share on other sites More sharing options...
Marks Posted November 16, 2008 Author Report Share Posted November 16, 2008 oj http://2files.oo.lv/s1 Link to comment Share on other sites More sharing options...
Marks Posted November 16, 2008 Author Report Share Posted November 16, 2008 P.s forši kāds manu sms shopu izdrāzis un nopizģījis. Kur viņu rāvi? o tas tavs ar vinu ir pilns internets Link to comment Share on other sites More sharing options...
X ID Posted November 16, 2008 Report Share Posted November 16, 2008 (edited) Kā kāds no mums var zināt kapēc tev nesaglabā uzģenerēto kodu, ja mums netiek doti nekādi kļūdas paziņojumi vai jebkas cits? Parādi, ko saka šis PHP <? mysql_query ("INSERT INTO code (code) VALUES ('$randcode')")or die(mysql_error()); ?> P.S. ry. es tavā vietā nelepotos ar šādu kodu (: P.P.S. Man gan izskatās, ka koda pārbaude notiek nekorekti, nevis kods netiek saglabāts. Edited November 16, 2008 by X ID Link to comment Share on other sites More sharing options...
ry. Posted November 16, 2008 Report Share Posted November 16, 2008 (edited) Es nelepojos, tas nebija mans koda gabals ko iedevi, kad viņs bija mans viss bija bumbās un viņš strādāja nevis uz fortumo bet NTP. Edited November 16, 2008 by ry. Link to comment Share on other sites More sharing options...
Marks Posted November 16, 2008 Author Report Share Posted November 16, 2008 Parādi, ko saka šis PHP <? mysql_query ("INSERT INTO code (code) VALUES ('$randcode')")or die(mysql_error()); ?> P.S. ry. es tavā vietā nelepotos ar šādu kodu (: P.P.S. Man gan izskatās, ka koda pārbaude notiek nekorekti, nevis kods netiek saglabāts. es nezinu ka precizi parbaudit jo par php esu iesacejs tpc pasutiju 1 sms un man atnaca kods datubaze vins nesaglabajas un vel pie koda pierakstija Table 'code.code' doesn't exist Link to comment Share on other sites More sharing options...
Marks Posted November 16, 2008 Author Report Share Posted November 16, 2008 (edited) A kada faila formata kad vins kodu ieraksta vinjam jabut jeb nu pasham kaut kads fails ir jaizveido datubaze ? Edited November 16, 2008 by Marks Link to comment Share on other sites More sharing options...
ry. Posted November 16, 2008 Report Share Posted November 16, 2008 .php Protams, ka jābūt arī datubāzei, lai viņš kautkur varētu arī tos datus saglabāt. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now