goma smile Posted October 14, 2009 Report Share Posted October 14, 2009 Tagad ir mazliet pavēls, nenāk prātā idejas tapēc lūdzu varat izlabot Lai būtu takā echo es nesaprotu kur jaliet tie ! if($_SESSION['security_code'] == $_POST['security_code'] && empty($_SESSION['security_code'] ) ) { echo 'security nav'; } else { echo 'ir'; } Quote Link to comment Share on other sites More sharing options...
briedis Posted October 14, 2009 Report Share Posted October 14, 2009 (edited) ja SESSIJA ir tukša un post arī ir tukšs, tad security nav. ja sesija nav tukša vai sesija nav vienāda ar post, tad security ir. A ko īsti gribi panākt? Pagaidām ļoti mulsinošs nosacījums, iesaku pārdomāt... :) Edited October 14, 2009 by briedis Quote Link to comment Share on other sites More sharing options...
goma smile Posted October 14, 2009 Author Report Share Posted October 14, 2009 (edited) Paldies if(!$_SESSION['security_code'] == $_POST['security_code']) { echo "<div class='wrong'>security nav</div>"; } else { echo "<div class='ok'>ir</div>"; } Edited October 14, 2009 by goma smile Quote Link to comment Share on other sites More sharing options...
goma smile Posted October 14, 2009 Author Report Share Posted October 14, 2009 (edited) Radās atkal jauna 4ibele kapēc $user_pass_1 = $_POST['parole_1']; $user_pass_2 = $_POST['parole_2']; if (!$user_pass_1 == $user_pass_2) { echo "Nesakrīt paroles."; } else { echo "sakrīt"; } vajadzētu būt tā ka ja ievada nepareizas paroles tad rāda ka nesakrīt bet tagad rāda ka sakrīt :@ kaut ievadu lai nesakristu Edited October 14, 2009 by goma smile Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted October 15, 2009 Report Share Posted October 15, 2009 == nozīmē vienāds != nozīmē nav vienāds Mācies programmēšanas pamatus. Quote Link to comment Share on other sites More sharing options...
briedis Posted October 15, 2009 Report Share Posted October 15, 2009 if ($user_pass_1 != $user_pass_2) { echo "Nesakrīt paroles."; } else { echo "sakrīt"; } Quote Link to comment Share on other sites More sharing options...
Cibiņš Posted October 15, 2009 Report Share Posted October 15, 2009 (edited) http://www.w3schools.com/php/php_operators.asp Nākošreiz noderēs :) Edited October 15, 2009 by MCWeb.lv Quote Link to comment Share on other sites More sharing options...
goma smile Posted October 15, 2009 Author Report Share Posted October 15, 2009 O paldies 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.