Posts by Flávio Silva • 469 points
17 posts
-
0
votes2
answers2759
viewsA: How to make Regex accept only numbers?
$regular = "#^\d+$#"; if(preg_match($regular, $this->cpf)){ // somente numero; if(strlen($this->cpf) == 11){ // Uma ajuda extra com regEx para formatar o cpf …
-
1
votes1
answer130
viewsA: Problem with last-Child
The name of magic is: nth-child .pai ul li:nth-child(3n) .box_padrao{ [...] } every three li it will apply this property. which in case, in 3 and 6…
cssanswered Flávio Silva 469 -
0
votes2
answers3475
viewsA: Return last characters from a string in PHP
Look, you can use a regular expression to get the information in a much simpler way, would this be it: <?php $string = "1º MCR-PRINCIPAL FUNDO DE INVESTIMENTO EM AÇÕES +97,01%";…
-
1
votes1
answer56
viewsA: Two numbers don’t add up, they concatenate
Dear friend, the function toFixed(n) will always return a type string why there is concatenation and not the sum of its values. And that’s why when you use Number works. For a less dramatic change…
-
1
votes1
answer76
viewsA: Condition not to send field in ajax
There is, but consider putting that validation into your backend, is more secure, and you can create other validations besides this... you can remove a property from an object using the delete.…
jqueryanswered Flávio Silva 469 -
0
votes1
answer65
viewsA: Send email to inbox via send button with completed form data
To make it easy, create a separate file for sending, the way it is it would try to send whenever html is run. email.php <?php $name = $_REQUEST['name'] ; $email = $_REQUEST['email'] ; $empresa =…
-
0
votes1
answer78
viewsA: doubt javascript function
Your javascript function is correct. You need to send an id to update only that record in the database. getdados.php <?php //Conectando ao banco de dados $con = new mysqli("localhost", "root",…
-
1
votes2
answers452
viewsA: How to send data from an HTML page to Mysql?
Always escape the data you want to send in SQL... prevents errors regarding accentuation and special characters. mysqli_query($conexao, "insert into `voluntários` (`nome`, `data`, `sexo`, ... It is…
-
1
votes1
answer366
viewsA: Display field sex select box with another value
Tell you what... I don’t know if this is it but that’s what I understood, you want it to come selected the amount that’s in your bank... would look like this: <div class="form-group col-md-2">…
phpanswered Flávio Silva 469 -
2
votes2
answers111
viewsA: Convert function for next ASP to PHP
Look what I understood from the question, do you want the letter to correspond to an index? If it is this see if this solution meets you: <?php $letras = range('A', 'Z'); $cod = '10F'; $titulo =…
-
1
votes1
answer1254
viewsA: Update one (Textview) through another function
Even though it is little information, I believe, from what I deduce there, you are calling a UI inside a Thread and it cannot connect directly to its interface, so it gives the error. Do the…
androidanswered Flávio Silva 469 -
3
votes1
answer1117
viewsA: I cannot enter data into the sqlite using javascript
Your problem is simpler than you think, remove the AUTOINCREMENT, because every primary key will be by default AUTOINCREMENT Below is a link with frequently asked questions about Sqllite, only in…
-
3
votes6
answers19014
viewsA: I want to align my menu to the center
Try to get more information next time, to make it easier to understand the problem, but from what the picture shows I think I know what you want. To achieve the effect you want, I believe it is…
-
1
votes1
answer2844
viewsA: Validate fields with selects (Combobox)
It is not very clear what you asked, what I understood and what you want to know if you are selected or in a select, if that is you can do as follows... I will use the pure javascript, if necessary…
javascriptanswered Flávio Silva 469 -
1
votes2
answers2105
viewsA: timediff() limited to 838:59:59, how to resolve?
This is a Mysql bug, in this link here you find information about this bug and a function to solve this problem bugs.mysql.com This function will return H:m, I don’t know what format you need, but…
-
5
votes1
answer2134
viewsA: How do I run Cron Jobs in PHP?
Missing by the name of the file you want php to open: 59 23 * * * php -f /home/u844214382/cronjobs/nomedoarquivo.php # -------------------------------------------^^^^^^^^^^^^^^^^^…
-
3
votes1
answer125
viewsA: How not to display past date records
SELECT * FROM `tabela1` WHERE `evento` LIKE '%$busca%' AND `nomeDoCampoData` > '2014-04-10' ORDER BY date(concat(ano,'-', mes,'-',dia)) ASC If you want to take between a period use the between…