user20 Posted July 21, 2005 Report Share Posted July 21, 2005 es gribeeju uztaisiit taa ja lauks "npk" nav aizpildiits, tad izlec no jauna html forma, ja aizpildiits tad pievieno datus datubeezei, it kaa visu uztaisiiju, bet skripts pievieno vienalga datubaazei ar lauku "npk" aizpildiitu vai neaizpildiitu! Kur kluuda? kods:http://paste.php.lv/2222 Link to comment Share on other sites More sharing options...
v3rb0 Posted July 21, 2005 Report Share Posted July 21, 2005 if(isset ($_POST['npk'])) uz if(isset ($_POST['npk']) && $_POST['npk'] != '') ? Link to comment Share on other sites More sharing options...
user20 Posted July 21, 2005 Author Report Share Posted July 21, 2005 paldies :) Link to comment Share on other sites More sharing options...
Venom Posted July 21, 2005 Report Share Posted July 21, 2005 a nu ja būs aizpildīts ar ' '? if (!empty($_POST['npk'])) Link to comment Share on other sites More sharing options...
PheliX Posted July 21, 2005 Report Share Posted July 21, 2005 a nu ja būs aizpildīts ar ' '? if (!empty($_POST['npk'])) 19650[/snapback] empty atgrieziis false uz stringu ' '. vispirms caur trim() tad jaalaizh... Link to comment Share on other sites More sharing options...
Venom Posted July 21, 2005 Report Share Posted July 21, 2005 tas bija atsevišķs jautājums, un empty bija kā variants isset ($_POST['npk']) && $_POST['npk'] != '' Link to comment Share on other sites More sharing options...
Recommended Posts