Posts by LocalHost • 3,256 points
106 posts
-
-3
votes1
answer63
viewsQ: How to ensure the Insert of all MYSQL data
I need to ensure that ALL data is entered, otherwise carry out a reversal and those that are entered are removed. I have the following case $dia1_entrada = $_POST['dia1_entrada']; $dia1_pausa_almoco…
-
4
votes3
answers165
viewsQ: Why authenticate your cell phone number via text in the register?
I am developing an android app, early on I come across the following question about security. Why authenticate by SMS? It brings extra security? Why not just check the number present on the cell…
-
3
votes1
answer57
viewsQ: Is it possible to create a different app version for each android version?
It has components that are not supported in previous versions of android, but has alternatives to them. Has some way to maintain ideal components for the ideal versions and alternatives for those…
-
0
votes0
answers528
viewsQ: Error : Unable to instantiate Activity Componentinfo
Guys I need to create an App, I’m still new in android, and I’m with the following error, and I’m not finding the solution. I even searched here on the forum. Anyone know what it might be? Error:…
-
-1
votes2
answers634
viewsQ: How to receive instant payment by credit card?
Well, these days I had to refuse a site and application proposal, because they needed to have a form of payment by the application/ site where it should be approved instantly, so that the order was…
-
1
votes1
answer172
viewsA: Image gallery with Carousel Boostrap. name.jpg separated by , no db!
Look, if from what I understand. You have a field with several photos, and you want to separate them now. With the explode da to remove the commas and turn into an array, with all photos separated.…
-
7
votes3
answers10473
viewsA: Check if the number is Javascript prime
I did it very quickly here, removing the code that was then Return, which was ignored. I put it in the other function in which it calls its main function. It’s pretty basic, you can get better...…
javascriptanswered LocalHost 3,256 -
1
votes1
answer24
viewsA: Uploading multiple images in the same db column starts with comma
From what I understand the only problem is that you’re going with an extra comma because of your concatenation shape, right? One way to solve this is to make a new string starting from the second…
-
3
votes2
answers1366
viewsA: How to check if a DIV has an ID
I think I understand your question, with the attr you can do this // verifica se a classe main possui um id if ($(".main").attr("id")){ alert("Classe main tem id"); } else{ alert("Classe main nao…
-
3
votes3
answers115
viewsA: How to access an array and export variables?
One way to access the content would be to inform the name of the array,: echo $certificate['cliente']; Another way would also be using the Extract , that performs the function that Voce wants, of…
-
4
votes2
answers3746
viewsA: How to make a vertically zebrad table (switch column colors)?
So? Using the selector nth-child. In this way, I believe that you do not need great explanations, if that is what you really want: td:nth-child(odd) { background-color:#ffffff; } td:nth-child(even)…
-
2
votes1
answer105
viewsA: Delete mysql data by Jquery
I made an example here friend, created in the same function to delete and send the data... Any doubt comments there. <script type="text/javascript"> $( function () { $( ".removerCampo" ).on(…
-
0
votes2
answers3541
viewsA: Algorithm to calculate lifetime in days
Would that be it? Any doubt comment... #include<stdio.h> #include<locale.h> int main(){ setlocale(LC_ALL, "portuguese"); int dia,diaatual,mes,mesatual,ano,anoatual,totaldias; int anos,…
-
4
votes1
answer156
viewsA: PHP Multidimensional Array
The error is due to the use of the brackets, and the concatenation. Try the following form: <?php for($I=0; $I<5;++$I){ for($J=0;$J<3;++$J){ print" Matriz A: <input class='_InpText2'…
-
0
votes1
answer149
viewsA: Undefined variable php error
That’s kind of silly, if that’s what I think is going on. It happens because sometimes the variable with the value to be searched, sometimes it will not exist in some contexts, but it is loaded in…
-
2
votes1
answer392
viewsA: how to load data from a page according to the clicked ID?
A simple and untreated method is to use the method $_GET. You can go through the link as follows: <a href="pagina.php?id=5"><a/> That one 5in case, it is your id, which you will recover…
-
4
votes3
answers630
viewsA: Check if there is tag within site
Good the code I believe is quite simple. First you need the source code of the site. that Voce can get as follows: $codigofonte=file_get_contents("http://www.google.com"); With the source code in…
-
1
votes2
answers1310
viewsA: How to display item that has been added to shopping cart with javascript?
It was not very clear his doubt, but it would be so? total = 0.00; function adiciona(id) { calcula(id, "adicao"); } function remove(id) { calcula(id, "subtracao"); } function calcula(id, operacao) {…
-
3
votes2
answers1054
viewsA: How to identify changed value in input
Would that be so? When loading the document, save the value of the field in the variable valor and when making the field change, I check if it is different from the value stored in the variave. If…
-
2
votes1
answer301
viewsA: How to get link from any anchor using regular expression?
Try that way, ignoring what’s in between a and href: preg_match_all('/<a.*href="(.*)"/i', $resultado, $outros); I hope I’ve helped!…
-
2
votes2
answers1478
viewsA: Menu effect appear slowly css
I made an example here using jQuery, which when detecting the movement of the scroll bar, checks its positioning with .scrollTop() and change the menu property as the bar moves. Note that the…
-
1
votes7
answers874
viewsA: Extract Array content for PHP variables
I don’t know what the name of your array looks like: $array= array( "InvoiceIdOut"=>879, "FiscalDocumentNumber"=>"AAAA879", "InvoiceURL"=>"http://teste.pt/maistestes/AAAA879",…
-
7
votes1
answer7815
viewsA: Insert date and time into mysql automatically?
Just create a table with the date field of type TIMESTAMPand with the pre-defined value as CURRENT_TIMESTAMP Follow Example sql: CREATE TABLE `tabelateste` ( `data` timestamp NOT NULL DEFAULT…
-
1
votes1
answer130
viewsA: Use of superglobals within a session
What you can do with $_SESSION . But since Voce didn’t enter the code, I’ll make an example: page1.php // inicias as sessoes session_start(); //verifica se a sessao contador nao existe…
-
0
votes2
answers171
viewsA: How to create a dynamic select to use on localhost
Basically you were using the same function for selecting the two options, and because you had the same id, it said you were already selected. And it really was, but it wasn’t what you wanted. So one…
-
4
votes1
answer927
viewsA: How to make a dynamic select?
Would that be it? Instead of selecting another select, I made an example that when selecting adds an input with the added value. $(".add").on('click',function(){ var cont=0; $("#selecionados…
-
0
votes1
answer569
viewsA: Javascript hides div when showing another div
There are several ways and do this (If I understood correctly ), with jquery Oce could do so. As you did not put code, and it seems to me that using php to appear the new div, I believe that it will…
-
5
votes1
answer191
viewsA: Which correct way to update
You passed id_seguradora = :id_seguradora ", but forgot to give the bindValue to him: $nome_seguradora = trim($_POST['nome_seguradora']); $cnpj_seguradora = trim($_POST['cnpj_seguradora']);…
-
3
votes3
answers1777
viewsA: PHP picking up Cloudflare IP instead of user IP
Try it this way: $http_client_ip = $_SERVER['HTTP_CLIENT_IP']; $http_x_forwarded_for = $_SERVER['HTTP_X_FORWARDED_FOR']; $remote_addr = $_SERVER['REMOTE_ADDR']; /* VERIFICO SE O IP REALMENTE EXISTE…
-
0
votes2
answers104
viewsA: How to insert element inside another dynamically created
It was not very clear your question. But it would be something like? $(document).ready(function() { var conteudo = $(".checkboxPersonalizada").html(); var check = "<input type='checkbox'>";…
-
2
votes1
answer171
viewsA: Change properties of a div with one click
Would that be? function mudaOpacidade() { document.getElementsByClassName("balao")[0].style.opacity=1; } .balao { height: 120px; width: 120px; background-color: #0f0; opacity: 0; } <div…
-
1
votes1
answer44
viewsQ: Why does this compressed css code stop working?
Why do some codes fail to work when being compressed? As is the example below. I used this website. Normal Code and working: .radio-1:checked ~ .star-item-1:before, .radio-1:focus ~…
-
2
votes2
answers613
viewsA: Adding data tags to the jquery button
Would that be? $("#botao").on("mouseover",function(){ $(this).attr("data-trigger","hover"); $(this).attr("data-toggle","popover"); $(this).attr("data-placement","bottom");…
-
2
votes2
answers139
viewsA: Because when I click the button to perform the function of showing an invisible form it shows the form but then disappears?
Would that be it? I added in function muda1() so that the same function makes the alternation of the formularies. function carrega(){ document.getElementById("form2").style.display = 'none'; }…
javascriptanswered LocalHost 3,256 -
4
votes9
answers12142
viewsA: Search via ajax during input text ( autocomplete )
If your question is weight that several requests will result. An alternative is to bring all the data to the select, and go eliminating them as they are being typed. That way I would avoid all these…
-
4
votes1
answer243
views -
4
votes2
answers76
viewsA: Problem with bank call for listing
If I’m wrong you reversed, it’s the $link first. And on or die(mysql_error()) you used absoleta function mysql different from the one you’re using. The right one would be: $dados =…
-
3
votes1
answer134
viewsA: Which correct way to add two fields
This is happening because you’re trying to add up different scores. Use this form, to leave them with the same formatting and then add them up: $num1="3.500.33"; $num2 = "90.33"; //Remove qualquer…
-
2
votes2
answers52
viewsA: When I create a Form deforms the Button
This is because you were setting fixed value for the size: Use the padding which is a margin inward, thus ensures that the size is equal #openSendForm{ background: #0ebd64; position: absolute;…
-
4
votes1
answer242
viewsA: Change php value with variable in url?
You can use the GET method : $ip=$_GET['ip']; $port=$_GET['port']; If you do it this way, and don’t pass the variables, you probably have an error displayed. So do it this way: //verificando a…
-
5
votes2
answers626
viewsA: How to hide an element after a certain time?
I made a function here, you can use this way, or even in php this way: <?php echo "<script>mensagem('alerta','Isso é um alerta');</script>";?> Or in js or jquery itself: function…
-
1
votes2
answers2699
viewsA: Hide entire table row by javascript
It would be something like that? function ocultar() { var total = document.getElementsByTagName("tr").length; var linha = document.getElementById("linha").value; if (linha > 0 && linha…
-
2
votes4
answers257
viewsA: Grab link on date and play on src from img on Hover
This would be a solution, with jquery, using the same function to swap the image while passing and remove the mouse: //executa a funçao ao passar o mouse por cima ou ao retirar o mouse de cima…
-
3
votes2
answers66
viewsQ: Storing data that can be accessed outside the database itself, goes against the 1st Normal Form?
For example, I have an invoice, which I can consult in another database (but not of my property), an example would be Pagseguro. I store only the invoice identification number to be able to consult.…
-
5
votes3
answers41543
viewsA: Alignment from side to side
Would that be it? In case, just add in div2 the property float:right;, so the div "floats" on the right. I hope I’ve helped! div.container { height: 100%; background: -webkit-linear-gradient(top,…
-
4
votes4
answers2310
viewsA: I cannot disable a checkbox with enable = false
Try this, using the same button to enable and disable: function habilita() { var check = document.getElementById("ind_permite_inc_autori_chkb"); var botao = document.getElementById("habilitar"); if…
javascriptanswered LocalHost 3,256 -
2
votes2
answers292
viewsA: Problem with recursive function in array
You can use the function array_search to return the array key value: $key = array_search('conteudo a ser buscado', $array); Following is php reference:…
-
2
votes1
answer38
viewsA: Save duplicate arrays to an Insert
You can do something like this: $i=0; $sql= "INSERT 'tabela' (produto, valor, qtd, total) VALUES "; while(!empty(produto[$i]){ $sql=$sql."($produto[$i],$valor[$i],$qtd[$i],$total[$i]),"; $i++; }…
-
8
votes1
answer1004
viewsQ: How to mount a SELECT to return the last status change of each id?
I have the following table: status_invoices id_fatura | status | data ---------------------------------------- XX-XX-XX | 3 | 2017-01-04 21:00:24 XX-XX-XX | 2 | 2017-01-02 11:10:20 YY-YY-YY | 4 |…
-
4
votes2
answers7594
viewsA: How to redirect page after login in php?
It’s simple, you just need to include this line in php: <?php header('Location:pedidos.php');?> I hope I’ve helped!