Posts by Tiago • 2,377 points
213 posts
-
1
votes0
answers101
viewsQ: Replace a name in all mysql database tables
Good morning. I need to replace a domain that is in several tables of the comic. That would be the correct form? SELECT REPLACE('*', 'velho.dominio.com', 'novo.dominio.com'); As there are many…
-
-4
votes1
answer42
viewsQ: Technical help. Grouping websites and improving traffic
I have a somewhat technical question, where I don’t have the science to know which decision to make, so I come to ask for help in the decision. Is she: I have several systems, each with its own…
-
0
votes1
answer84
viewsQ: Live helper chat - Your IP is not allowed to perform updates
I’m trying to set up the script of Live Helper Chat to update automatically, but I’m not getting it. I’ve already asked for help on forum but the answers are always incomplete. The instructions that…
-
1
votes0
answers131
viewsQ: Arduino LCD Display does not display message
I’m using the simulator https://www.tinkercad.com. I am unable to do it appears the test message on the display. When calling does not show message, just turn on the display. What I’m doing wrong?…
-
1
votes0
answers14
viewsQ: Error in bind_param. Data Too long for column
I’m making the following mistake Error: Data Too long for column 'options' at Row 1 This is my code: $arr = Array(); foreach($_POST['opcoes'] AS $n=> $m) { $p = explode("|", $m); $arr[] =…
-
1
votes1
answer70
viewsQ: Clone table with checkbox values
Updated code. Edson Alves' help. I’m having trouble calculating Total sum when unchecking the checkbox. At the moment I am checking, it calculates correctly, the problem is in the unchecking that…
-
3
votes1
answer242
viewsQ: Pin icon to bottom right corner using Materialize
First time I’m using the materialize. I would like to know how to fix an icon in the lower right corner. <a class="btn-floating btn-large cyan pulse right"><i…
-
1
votes1
answer46
viewsQ: Atom, save without GOOD
I’m starting with Atom. How do I save or change the file to UNWORTHY?
-
1
votes1
answer206
viewsQ: fetch_array() error in php7
I used this code in php version 5, but after I switched to php 7, this error appeared. Fatal error: Uncaught Error: Call to a Member Function fetch_array() array on $selec =…
-
3
votes1
answer674
viewsQ: Open new pages/links inside the tab
I found interesting how the system opens the pages "within tabs" and I’m trying to make a similar. I’m having trouble opening the links, but it doesn’t work, what my mistake?…
-
1
votes0
answers367
viewsQ: Php script to know how many possible combinations it is possible to have
I would like to create a simple script, just to know number of possible combinations. It would not be to see the list of combinations, but only how many digits you can have, and the numbers and…
-
2
votes1
answer125
viewsQ: Take data-Cod element value
How do I get the value of the data-Cod element? $(document).ready(function() { $('.chatUsuariosLista').click(function() { $("#para").val(this.id); }); }); <script…
-
0
votes1
answer51
viewsQ: Submit using Ctrl+Enter or Click the button
Currently I use this code to send my messages. $('#chatEnvia').click(function() { $.post( "inc_chatEnvia.php", { acesso: "ok", msg: $("#chatEscrita").val() }); }); I wonder, how do I stop when…
-
2
votes1
answer4040
viewsQ: jsPDF include css
How do I save this DIV, with css formatting, if it is easier to do with table, also can, because what I need is only show this DIV with value inside. It will be generated side by side. var doc = new…
-
1
votes1
answer822
viewsQ: Echo respecting mysql line break
I would like to know how to make the echo PHP respect the line break of a text in the database. I have a text field in the registration form like this: <textarea id="descricao" name="descricao"…
-
0
votes1
answer77
viewsQ: Htaccess - Site Friendly URL at the Root
How to make URL friendly open at the root. I have the file workVer.php? id=1 I’d like it to open like this: www.site.com/87190-first-test Doesn’t work: RewriteRule ^([^/]*)\$ /trabalhoVer.php?id=$1…
-
2
votes1
answer804
viewsA: Jquery autocomplete for city search, does not distinguish data from cities with the same name
Hello, see if I can help. If so, mark up and tick ;) <?php $("#busca").change(function() { pais = $(this).val(); $.getJSON("consulta.php", {consulta:pais}, function(json){…
-
1
votes3
answers4336
viewsQ: Get value from all checkboxes marked
How do I take all checkbox values that are checked and move to GET. $("#subcategoria").click(function(){ var checados = []; $.each($("input[name='subcategoria[]']:checked"), function(){…
-
1
votes1
answer102
viewsQ: Creating super class for PHP form protection
I’m thinking of trying to build a super class to protect forms. Whoever has new ideas post there for me to update. Someone adds something else? function seguro($sql){ // remove palavras que…
-
5
votes3
answers1170
viewsQ: Generate 5 digit combinations
How do I generate 5 digit php combinations ranging from 0 to 9? In that same, in the future want to add letter, as it should be done?
-
1
votes1
answer91
viewsQ: Compare Explode Array with select option text
How to compare the Array of explode, with the text of option. If the same, mark with Selected. <?php //header('Content-Type: application/json; charset=utf-8'); include 'config.php'; $rs2 =…
-
0
votes1
answer149
viewsQ: Jquery Chosen not returning value
How to make the Chosen display value of the search. It is not showing the options within select. HTML <select id="habilidades" name="habilidades[]" multiple class="input col-lg-10 chosen-select…
-
1
votes1
answer87
viewsA: Pass jquery variable to search subcategory
I managed to, I’ll leave it on record here for anyone who has the same doubts as me. SELECT $rsCategoria = $conexao->query("SELECT * FROM categoria"); HTML <select id="categoria"…
-
0
votes1
answer87
viewsQ: Pass jquery variable to search subcategory
I’m doing two select, the category and subcategory. Both via Mysql. I would like to pass the category ID to the Subcategory when selecting the category. $rsCategoria = $conexao->query("SELECT *…
-
0
votes1
answer67
viewsQ: Return getJSON
When getJSON, does it not find what is returned? I’m leaving as Fazio, but not the right one. $("#email").focusout(function() { emailDigitado = $("#email").val();…
-
-1
votes1
answer173
viewsQ: Property bar and database for Phpstorm
The Phpstorm possesses property bar and database similar to Dreamweaver? If so, how to activate?…
-
0
votes3
answers1803
views -
0
votes2
answers1092
viewsA: Jquery load div auto scroll
I got it using only CSS. Searching I found this comment https://stackoverflow.com/a/44051405/3939389 Solution for those who have the same problem display: flex; and flex-direction: column-reverse;…
-
1
votes2
answers1092
viewsQ: Jquery load div auto scroll
How to make high scoll when loading the page? I’m trying to do this, but without success! File: messages.php $('.chatUsuariosLista').click(function() { idUsuario = this.id;…
-
0
votes1
answer132
viewsQ: Sort select by date
How to sort this select by DATE? (SELECT * FROM mensagens WHERE de = '2' && para = '1' ORDER BY data) UNION (SELECT * FROM mensagens WHERE de = '1' && para = '2' ORDER BY data)…
-
0
votes1
answer89
viewsQ: PHP While generating more loop
My while is inventing a count more. Why that? $rsMsgLer = $conexao->query("SELECT * FROM mensagens WHERE para = '".$row['ID_Cadastro']."' GROUP BY de"); . <?php do { ?> ... <?php } while…
-
0
votes1
answer404
viewsQ: Uncaught Typeerror: $(...). Attr is not a Function
because it doesn’t work? $('#chatEnvia').click(function() { if ($("#chatEscrita").val() !== "") { $.post("inc_chatEnvia.php", { acesso: "ok", msg: $("#chatEscrita").val(), de: $("#de").val(), para:…
-
0
votes1
answer478
viewsQ: Jquery add and remove attribute not working
I’m trying to create a way to minimize and maximize a DIV. Minimize works, but maximize does not. What am I doing wrong? $("#chatMinimizar").click(function() { $("#chat").attr("style", "height:…
-
1
votes1
answer2201
views -
5
votes1
answer1745
viewsQ: Is PHP Login Safe?
I am doing the login screen, where when successfully logging in, is stored a value in $_SESSION['login']. Administrative options will be open only if this session exists. My question, is it safe? If…
-
0
votes1
answer326
viewsQ: PHP error when displaying search result with select
Error while selecting database data. $rs = $conexao->query("SELECT FROM cadastro WHERE ID_Cliente = '83'"); $row = $rs->fetch_assoc(); echo $row['nome']; Fatal error: Uncaught Error: Call to a…
-
0
votes1
answer800
viewsQ: Grab the last ID when inserting into Mysql database
How to get the last ID when inserting into BD Mysql, using PHP and Mysqli. $inserir = $conexao->query("INSERT INTO cadastro (nome, sobrenome) VALUE ( 'Fulano', 'De tall' "); echo $id =…
-
-1
votes1
answer245
viewsQ: Mysqli INSERT error
I am not able to identify the error. I have always set up structures like this, but now this error appears. Parse error: syntax error, Unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or…
-
0
votes1
answer2546
viewsQ: Parse error: syntax error, Unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or Identifier (T_STRING) or variable (T_VARIABLE) or
I can’t figure out where the mistake is. I believe it’s on my face, but I can’t find it! $inserir = $conexao->query("INSERT INTO cadastro (nome, sobrenome, email, senha, contrata, trabalha,…
-
0
votes1
answer222
viewsQ: Hide Carrousel images when opening on mobile and show others - Bootstrap 4
I’m using the component Carrousel of bootstrap 4. My intention is to make when it opens on PC and Tablet, be shown the slide with original images. When opened on mobile phone, open another image…
-
0
votes1
answer1698
viewsQ: Disable line breaking in phpstorm
I would like to know how to disable Phpstorm line breaking.…
-
1
votes1
answer51
viewsQ: Excel SES returning #N/D
I’m creating a check to see if the value of heaviness this between:…
-
1
votes2
answers325
viewsQ: Getsqlvaluestring / mysqli_real_escape_string / Notice: Undefined variable: mysqli
I am trying to convert a function to Mysqli, to use with PHP7.1. I am having difficulties with mysqli_real_escape_string, and mysqli_escape_string. Error: Notice: Undefined variable: mysqli in…
-
0
votes1
answer38
viewsQ: Google MAP - Exchanging comma per point using native JS
Hello, I’m using a google map function to return distance between Zip Codes. function callback(response, status) { if (status == google.maps.DistanceMatrixStatus.OK) { kmDistancia =…
javascriptasked Tiago 2,377 -
1
votes1
answer1038
viewsQ: How to solve "Access-Control-Allow-Origin" problem
I don’t know how to solve the problem of Access-Control-Allow-Origin. What to do to function properly? function calc() { var cepDestino = document.getElementById( 'cepDestino' ).value;…
javascriptasked Tiago 2,377 -
1
votes1
answer237
viewsQ: $.getScript Jquery Javascript replacement
I found a zip code query on the internet, but would not like to use jQuery. It is possible to change $.getScript jQuery for Javascript? var cepDestino = document.getElementById( 'cepDestino'…
javascriptasked Tiago 2,377 -
4
votes2
answers69
viewsQ: IF to check quantity needed for given KG
I need to do an IF in Javascript. I will explain: A customer sells: Barrels of 40kg. Tube of 3 kg. I don’t know how to do this IF. The idea is, show in the field qtd40kg Only multiples of 40, which…
-
2
votes1
answer2994
viewsQ: Display mysqli error using die
Wore mysql_query, as it is no longer used I am using the MySQLi. That left me with a question. To display query error by DIE that’s how you do it? $sql = $mysqli->query("SELECT * Fron tabela") or…
-
2
votes2
answers89
viewsQ: Mysql, help to understand data export
In the old days when I was exporting a database I was like this: CREATE TABLE `config` ( `ID_Config` int(1) NOT NULL AUTO_INCREMENT, `nome_site` varchar(255) DEFAULT NULL, `thema` char(50) NOT NULL,…
-
0
votes2
answers410
viewsQ: How to use sprintf to mount an SQL query?
What is the correct way to use sprintf in mysqli and make the return IF? $rs = $mysqli->query(sprintf("INSERT INTO perguntas (chave, nome, email, idade, estado_civil, profissao, religiao,…