Questions tagged as 'if'

1
answer

The code does not respect ifs

Hello, in this code when running it does not respect the ifs, it goes straight through running everything. For example, if the message "This user does not exist" appears, it should simply close. but also the message "Incorrect password" appears....
asked by 25.04.2015 / 06:40
2
answers

what should I do to authenticate user correctly [duplicate]

I need help to authenticate users on my site but I do not know what the sql variable that estanciei returns when it finds the right user what I put in if? <?php include 'conexao.php'; $conexao = conexao::getInstance(); $login = $_POST[...
asked by 07.06.2018 / 19:44
1
answer

Css in conditional (only with JQuery)

I'm trying to put the color inside the conditional, but I can not. PS: There are three different colors and it can only be done with JQuery. <script> var qtd; $(function () { $("#btn1").click(cadastrarDados); $("#...
asked by 22.10.2017 / 22:57
1
answer

if within mysql show to create or insert [closed]

Good afternoon, I need to understand how an if inside mysql works so I can use it as follows. I have a foreach which only executes after a select database because it leaves an array for this foreach, in this foreach it will run a condition, i...
asked by 20.03.2016 / 22:03
2
answers

"if" does not match the [closed]

I'm trying to apply a if to my code, but it's coming wrong: <?php echo $usu_id . "<br />"; echo $centraliz . "<br />"; echo $marca . "<br />"; if($centraliz = "S"){ echo "É centralizada"; } else { echo "Não...
asked by 25.10.2017 / 12:44
2
answers

What does the expression "! (errS & errE)" in the if?

In a part of a code that I need to understand, a new syntax appeared for me in if : if (!(errS&errE)) { fprintf(stderr, "\nFALTA ARGUMENTOS\n"); if(!errS) fprintf(stderr, "-s NOME ARQUIVO SAIDA \n"); if(!errE)...
asked by 04.04.2018 / 08:47
1
answer

If only returns the first result [duplicate]

Hello, I have the problem in the code where my "IF" only returns the first result: if ($aluno['janimal']="1"){ $animal = "Réptil";} elseif($aluno['janimal']="2"){ $animal ="Cavalo";} elseif($aluno['janimal']="3"){ $anim...
asked by 23.01.2018 / 18:50
1
answer

Read Integer in Java

I have an exercise in Java where the program should read two numbers typed by the user and he should tell me which one is the greatest! In this case, you can not use only IF , right? Should I also use ELSE ? Yes they are ex...
asked by 02.06.2018 / 01:23
2
answers

Language C - The structure jumps directly to ELSE by ignoring IF parameters [duplicate]

#include<stdio.h> int main(){ //Escolhe entre nome do personagem e classe int p,c; printf("RPG teste\n"); printf("Digite um nome para o seu(a) personagem:"); scanf("%s",&p); printf("Escolha uma classe, digi...
asked by 23.09.2018 / 04:55
1
answer

I need help with PHP language

So I'm having trouble with a part of my code, as it's too big I'll post only the part that is in error: <?php try{ $entrar = $_POST["entrar"]; $cpf = $_POST["cpf"]; $senha = $_POST["senha"]; /*Conexão com o banco de dados...
asked by 31.08.2018 / 16:18