Posts by rbz • 9,949 points
356 posts
-
6
votes3
answers3914
viewsA: How to put the value of a PHP variable inside an input?
Use the "value=value" Ex.: <input type="text" placeholder="R$ 0,00" id="cr33" name="ncr33" value=<?php echo $variavel ?>/> Do so: <?php $crTot = ""; if(isset($_POST)){ $cr1 =…
-
0
votes1
answer162
viewsA: SQL doubt using subquery and IN command
I’ll give you a concept (as I don’t know your bank), but that’s the idea: SELECT * FROM users WHERE iduser IN ( SELECT DISTINCT(iduser) FROM user_mod WHERE idmodelo IN…
-
0
votes2
answers1988
viewsA: Authenticated PHP Mailer Sending using Gmail
Use $mail -> SMTPSecure = "tls"; Sometimes door 587 only works with TLS with Gmail... happened to me. Or $mail->Port = 465; For SSL Besides having to release your email in your google account.…
-
1
votes1
answer56
viewsA: Display 1, 2, 3 if you receive odd numbers
As I believe you want to print the position of the prime numbers, you cannot have the == 3, >3 and -3, because the difference between the numbers always increases. You’ll have to treat them…
-
0
votes1
answer55
viewsA: How to use the ternary here?
$rs = $pbc->selectPublication(filter_input(INPUT_GET, 'id', FILTER_DEFAULT)); echo ($rs) ? $rs : '0'; If the variable has return, then either it has "content" or it is 0 or false correct ?!…
-
1
votes3
answers62
viewsA: $array exposing next result?
//consulta mysqli $query = mysql_query("SELECT numero, orig, dest, eqpt, rota FROM voos ORDER BY RAND() LIMIT 5", $con) or die(mysql_error()); Failed to put the connection in the query...…