Artic^MX Posted December 10, 2005 Report Share Posted December 10, 2005 Kā php grupēt if'us lai izpildās viens rezultāts? Man ir vairaaki if'i! if (blabla) { $er = 1; } if (blabla) { $er1 = 1; } vaidzeetu lai beigaas iedarbojas heders header("Location: blabla.php?er=1&er1=1"); kā to izdarīt? Link to comment Share on other sites More sharing options...
Grey_Wolf Posted December 10, 2005 Report Share Posted December 10, 2005 iisti nesapratu ko biji domaajis :( ---- if (bla==1) { aaa } else if (bla==2) { bbb } else if (bla==4) { eeeee } else { kkk } ----- izpildiisies tikai 1 no nosacijumiem.... Link to comment Share on other sites More sharing options...
Artic^MX Posted December 10, 2005 Author Report Share Posted December 10, 2005 bet vaig lai izpildaas visi if rezultaati reizee! Link to comment Share on other sites More sharing options...
goldy Posted December 10, 2005 Report Share Posted December 10, 2005 priekskam tad if ja vajag lai izpildaas visi, if lieto lai izpildiitos kaut kas viens no vairaakiem iespeejamiem bet ja gribi ar if tad: if (bla==1) { aaa } elseif (bla==1) { bbb } elseif (bla==1) { eeeee } else { kkk } Link to comment Share on other sites More sharing options...
Artic^MX Posted December 10, 2005 Author Report Share Posted December 10, 2005 un kur es varu izsutit hederi? if (empty($reg_niks) or empty($reg_pass) or empty($reg_pass1) or empty($reg_email)) { $error1 = 1; } if ($reg_pass !== $reg_pass1) { $error2 = 1; } if (!eregi('[0-9a-z]', $reg_niks)) { $error3 = 1; } if (!eregi('[0-9a-z]', $reg_pass)) { $error4 = 1; } iistais scripts un vajag taa lai man atlasaas tie $error kur ir 1 Link to comment Share on other sites More sharing options...
Grey_Wolf Posted December 10, 2005 Report Share Posted December 10, 2005 if ( a==1 AND b==2 AND c==3) if (a==1 OR b==2) prograameeshanas pashi pamati !!! Link to comment Share on other sites More sharing options...
bubu Posted December 10, 2005 Report Share Posted December 10, 2005 Ne jau programmēšanas, bet elementāras loģikas pamati. Link to comment Share on other sites More sharing options...
vladimirs Posted December 11, 2005 Report Share Posted December 11, 2005 nevar saprast ko tu veido, bet bez if gan jau var iztikt, ja viens rezultaats. Link to comment Share on other sites More sharing options...
Kavacky Posted December 11, 2005 Report Share Posted December 11, 2005 Vladimirs man sāk nepatikt. Link to comment Share on other sites More sharing options...
php_Stopp Posted December 11, 2005 Report Share Posted December 11, 2005 Vladimirs man sāk nepatikt. :D Link to comment Share on other sites More sharing options...
Recommended Posts