Jump to content
php.lv forumi

Problēmas ar if


goma smile

Recommended Posts

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';
  }

Link to comment
Share on other sites

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 by briedis
Link to comment
Share on other sites

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 by goma smile
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...