Questions tagged as 'else'

1
answer

Redirect pages using if, else if, and else attributes What is wrong? [closed]

My php code <?php include "conectar.php"; //comando para iserir dados direto do formul?rio para o banco de dados $nome=$_POST["nome"]; $cpf=$_POST["cpf"]; $identidade=$_POST["identidade"]; $telefone=$_POST["telefone"]; $celular=$_POST["...
asked by 16.11.2017 / 19:10
2
answers

Creating rule to create time based on delivery rate

I have a condition in my form that calculates the delivery time of the orders, follows the rule below: date_default_timezone_set('America/Sao_Paulo'); $Agora = date('H:i:s'); $HoraServico = date('H:i:s', strtotime('+69 minute', strtotime($Agor...
asked by 29.08.2017 / 23:57
2
answers

Picker View - Display an ImageView according to the sum of values

Hello. I'm trying to work with Picker View to display a combination of values. var pickerDataSource = [["a", "b", "c", "d"],["1","2","3","4"]]; Doubt is; how do I get results within a condition? if(row == 0) { self...
asked by 28.03.2016 / 22:55
1
answer

How to condition e-mail content with chosen variable in form?

I am trying to condition the format of the email sending by a certain option chosen by the user, in the Subject / Script field: If the option is SCRIPT, the contents of the $ html variable will be sent. If it is INFORMATION, the contents of the...
asked by 02.12.2018 / 15:08
1
answer

Setting minutes at the time of operation

I have the following code, where it determines the time of delivery. Here is the code: function delivery(){ var cep1 = document.getElementById("cep1").value; var cep2 = document.getElementById("cep2").value; var cep = cep1 + "-" + cep2;...
asked by 29.09.2017 / 20:01
2
answers

How to do an if / else within a route?

I have a form that has two types of users: administrators and developers and each has its post login page, but even logged in as administrator, I can go to the developers pages. I need to fix this!     
asked by 19.04.2017 / 19:12
1
answer

Counters not being incremented in code

I'm having some difficulties with the code snippet below: The call to this function is: cache = OperaCache(true , endereco, op, cache, descricao, read_hits, read_misses, write_hits, write_misses); VETOR_CACHE OperaCache(bool conta...
asked by 23.11.2016 / 13:50
2
answers

Is it possible to have a ternary without the else block?

Is there a possibility to create a simpler if ternary, say without the else block code? how would it look? Type: if($total < 10){ $total_gerente = 10; } For what I know the ternary has IF and ELSE. Is it possible to only have the if...
asked by 11.07.2016 / 15:06
1
answer

Null input via keyboard in a variable receipt via JavaScript

Good Night! In my practical experiences in JavaScript, I tried to create a condition to alert the user to a variable that he left unnoticed by pressing the enter key twice. However, trying to solve this problem, I made two attempts: /*Te...
asked by 11.12.2018 / 02:12
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