gunmetal Posted March 29, 2010 Report Share Posted March 29, 2010 Kurš var pateikt, kādu php kod, kurš palīdzētu... Kods ir tikai viens. piem. man atsūta vēstu! es atpakaļ to kodu. džeks ievada to kodu un atver piem. bildi. Ja sapratat tad lūdzu palīdziet :) Quote Link to comment Share on other sites More sharing options...
waplet Posted March 29, 2010 Report Share Posted March 29, 2010 nesapratām. Quote Link to comment Share on other sites More sharing options...
gunmetal Posted March 29, 2010 Author Report Share Posted March 29, 2010 nesapratām. Quote Link to comment Share on other sites More sharing options...
chizijs Posted March 29, 2010 Report Share Posted March 29, 2010 (edited) $kods = mysql_query("SELECT * FROM kodi WHERE kods = '".is_numeric($_POST['kods'])."'"); if(mysql_num_rows($kods) > 0){ echo"<img src='' />"; mysql_query("DELETE FROM kodi WHERE kods = '".is_numeric($_POST['kods'])."'"); }else{ echo"kods nepareizs"; } vai if($_POST['kods'] == "mans_kods"){ echo"<img src='' />"; }else{ echo"kods nepareizs"; } Edited March 29, 2010 by chizijs Quote Link to comment Share on other sites More sharing options...
gunmetal Posted March 29, 2010 Author Report Share Posted March 29, 2010 $kods = mysql_query("SELECT * FROM kodi WHERE kods = '".is_numeric($_POST['kods'])."'"); if(mysql_num_rows($kods) > 0){ echo"<img src='' />"; mysql_query("DELETE FROM kodi WHERE kods = '".is_numeric($_POST['kods'])."'"); }else{ echo"kods nepareizs"; } vai if($_POST['kods'] == "mans_kods"){ echo"<img src='' />"; }else{ echo"kods nepareizs"; } OOO paldies bet ir iespējam ka katreiz kods ir savādāks? :) Quote Link to comment Share on other sites More sharing options...
chizijs Posted March 29, 2010 Report Share Posted March 29, 2010 $r1 = rand(0,9); $r2 = rand(0,9); $r3 = rand(10,99); $kods = $r1.$r2.$r3; mysql_query("INSERT INTO kodi(kods) VALUES('$kods')"); Atver failu un taisi refresh ^^ Quote Link to comment Share on other sites More sharing options...
rausis Posted March 29, 2010 Report Share Posted March 29, 2010 kapēc is_numeric? :) ...(int) vai intval() ;) Quote Link to comment Share on other sites More sharing options...
chizijs Posted March 29, 2010 Report Share Posted March 29, 2010 Kāda starpība?? ^^ Quote Link to comment Share on other sites More sharing options...
xPtv45z Posted March 29, 2010 Report Share Posted March 29, 2010 Tāda, ka is_numeric - Returns TRUE if var is a number or a numeric string, FALSE otherwise. Quote Link to comment Share on other sites More sharing options...
gunmetal Posted March 29, 2010 Author Report Share Posted March 29, 2010 Tāda, ka is_numeric - Returns TRUE if var is a number or a numeric string, FALSE otherwise. Nu kāpēc jājauc prāts man? :DD Es no kodēšanas neko nejēdzu :D Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted March 29, 2010 Report Share Posted March 29, 2010 Vai gribi sākt jēgt? Quote Link to comment Share on other sites More sharing options...
gunmetal Posted March 29, 2010 Author Report Share Posted March 29, 2010 Vai gribi sākt jēgt? Nu īstenībā jā :D Quote Link to comment Share on other sites More sharing options...
briedis Posted March 29, 2010 Report Share Posted March 29, 2010 Nu īstenībā jā :D Nu tad viens vārds - RTFM, un problēmas atrisinātas! Quote Link to comment Share on other sites More sharing options...
gunmetal Posted March 29, 2010 Author Report Share Posted March 29, 2010 Nu tad viens vārds - RTFM, un problēmas atrisinātas! Tu domā kam man tas ko izsaka? :DDD Quote Link to comment Share on other sites More sharing options...
gunmetal Posted March 29, 2010 Author Report Share Posted March 29, 2010 Nu tad viens vārds - RTFM, un problēmas atrisinātas! ā nu sk paldies :DDD 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.