Posts by programmer2016 • 545 points
35 posts
-
1
votes1
answer38
viewsQ: Query to get all records regardless of whether they exist in another table or not
I’m running an app from a store where users can leave equipment to be fixed. So I made a php to search by name those users who have already left some equipment: $sql = mysqli_query("$conexao, SELECT…
-
0
votes1
answer37
viewsQ: Error entering data into BD using mysqli
I’m trying to insert into 2 data tables, but I always have the error of Cannot add or update a child row: a foreign key constraint fails that is to say that it cannot insert in the second table,…
-
4
votes1
answer69
viewsQ: PHP - Mysqli correct way
I’m starting to use mysqli in my projects, however I saw two ways to make a connection: One of them is simple and equal to mysql_connect $db = mysqli_connect(...); I saw in w3schools. Another is the…
-
0
votes0
answers275
viewsQ: Event fires once more for each click
I was making a store application, in the application, when clicked on the product image, opens a modal indicating the quantity. This modal has a button submit to send the data in the database. By…
jqueryasked programmer2016 545 -
0
votes1
answer46
viewsQ: Upload image using ajax
I wanted to insert an image on the server using AJAX. I have tried to do it in a number of ways but I am unable to upload the image to the server. If anyone can find a solution, I would appreciate…
-
2
votes1
answer6060
viewsQ: Darken background when opening modal window/div
I tried to create something like modal, thus: .try-modal{ position: absolute; top:35%; left:25%; right: 25%; width: 50%; height: 400px; background-color: white; z-index: 2; } I call to <div…
-
0
votes1
answer34
viewsQ: Send a javascript string
Is there any way to send a string by parameters in javascript? I have something like: <i class="fa fa-folder-open" aria-hidden="true" style="cursor:pointer;"…
-
2
votes2
answers145
viewsQ: Modeling Database
Specifying the tables I’m doubtful are, in my case, a work of a company for the college, the tables: Input and Diagnosis, in which the input is when someone brings some equipment, and then is made…
-
0
votes1
answer58
viewsQ: Doubt SQL tables
In the 1:1 relations I have done in another way that only today I noticed, in which I turn this 1:1 to 1:N, and in the table that has the N, the primary key is the same as the 1, so it’s like 1:1,…
sqlasked programmer2016 545 -
0
votes3
answers2538
viewsA: Mysql query and case distinguish
I added BINARY in the query, and it worked. Upshot: $id = $_POST['id']; $password = $_POST['pw']; $consulta = mysql_query("SELECT id,password,tipo_ut FROM utilizador WHERE id…
-
2
votes3
answers2538
viewsQ: Mysql query and case distinguish
I wish my login.php check if the password has uppercase, because when it exists, it recognizes, because I have my database with the collation utf8_general_ci. I already tried to put the collation on…
-
0
votes0
answers18
viewsQ: AJAX inside AJAX
I did something like the user type in what I ask, then click on the find, and then do a ajax to find the search data and send it to a div. What the ajax get inside that div is basically this:…
-
1
votes1
answer377
viewsQ: send to another page after AJAX
After the AJAX be done wanted to give the message of "success" opened a new tab. AJAX: $.post('registo-entrada.php',{ id_ficha:id_ficha, equip_ficha:equip_ficha, pw_ficha:pw_ficha,…
-
3
votes1
answer30
viewsQ: PHP problem with SQL INT
I’m making a form sending the data by AJAX and then insert, so far so good. Only the maximum value of the INT in SQL is 2147483647, and the field I have has at most 11 digits that can go up to…
-
2
votes2
answers102
viewsA: HTML Forms with PHP
The problem was that the camps were required. because when submitting the form, the div that was hidden, had value null and that’s why I wouldn’t let you submit. So I did so:…
-
3
votes2
answers102
viewsQ: HTML Forms with PHP
I have this great quiz, inside a modal that when I click the record button, the button does not redirect to the page I want. The Error is not of the page registrar.php because I had put a simple…
-
1
votes1
answer653
viewsQ: Curiosity - PHP and Data Query Limit
Today while doing an appointment by Phpmyadmin of the type SELECT * FROM tabela , I noticed that after making a query in the database automatically the query gets the LIMIT, in this way SELECT *…
-
0
votes1
answer29
viewsQ: Send AJAX to a table
I have in a database data page inserted in a table: <div class="procurar"> <input type="text" id="search" onkeypress="mandar()"><i class="fa fa-search"…
-
2
votes3
answers127
viewsQ: AJAX - Appearing Ivs
How do I get one div on the return of AJAX, for example: I type in input a user, and send the data by AJAX thus: $("#botao").click(function(){ var xprocesso = $("#segundo").val();…
-
1
votes1
answer128
viewsQ: Pass the value of an option to another option without going through pages
I have an option <p> Curso: <select name='curso' id="aparecercurso" class="escolhercursos"> <option>Nenhum</option> <? $sqlcursos = "SELECT designacao FROM cursos";…
phpasked programmer2016 545 -
1
votes1
answer71
viewsQ: SQL query returns
I have a table for the query to send the information there, and it appears " " instead of letters with accents. I am already using html <meta charset="UTF-8"> Is there something missing? This…
-
0
votes1
answer77
viewsQ: Problem with editing database data
I had already asked a question before why the modal did not multiply with the while (It’s already solved). That was the result: $editar = 0; $sql = mysql_query("SELECT…
-
0
votes0
answers29
viewsQ: AJAX is not working
Does anyone know why this AJAX isn’t it working? The variables are receiving the values, only the part of sending the data to actualiza.php is that it doesn’t work. $("#btnedit").click(function(){…
ajaxasked programmer2016 545 -
0
votes2
answers81
viewsQ: View data from a database in modals
I made a table to display 2 database data, and then on each line put an icon so that when clicked there appeared a modal with information from that line of type: <? $sql = mysql_query("SELECT…
-
0
votes2
answers84
viewsQ: Javascript problem in converting value to int
I need two functions that pick up the value of one input and send it to another input this value +2, had already asked this question here but went to +3 and got the solution, however I did another…
javascriptasked programmer2016 545 -
2
votes0
answers120
viewsQ: What is AJAX for?
Someone could tell me, during his programming career, how he knew he would need to learn how to use AJAX, what was the purpose etc.? I’ve been trying to figure out AJAX from W3schools for hours, but…
-
1
votes1
answer70
viewsQ: PHP - Sessions and cookies
I have a page login.php which after being filled goes to the processa.php and then enter the session and cookie: $cookie_name = "Administrador"; $cookie_value = $id; setcookie($cookie_name,…
-
0
votes2
answers56
viewsQ: Best way to capture data from a query
I have presented in a table of a site information of a database this way: <? $sql = mysql_query("SELECT id, nome FROM pessoas"); //---------------DADOS------------------------ while($row =…
-
0
votes0
answers54
viewsQ: Insert data by PHP
After submitting the form I do the following: $n_processo = $_POST['n_processo']; $nome = $_POST['nome']; $dia = $_POST['dia']; $mes=$_POST['mes']; $ano = $_POST['ano']; $data =…
-
4
votes3
answers63
viewsQ: Javascript send an account to an element
I have 2 fields on my site where in one of them I have to enter a number as I write and another that has to receive this value adding +3. I used the following form: <input type="text"…
javascriptasked programmer2016 545 -
1
votes1
answer87
viewsQ: Hide a javascript mask
Does anyone know how to hide Mask _ (javascript) for example on my site: Name: _ _ _ _ _ _ _ _ _ _ and I wanted to hide the "_". <script src="ajax.googleapis.com/ajax/libs/jquery/1.12.0/…;…
-
1
votes2
answers229
viewsA: Creation of Masks with javascript
I did it! I changed it <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> <script src="assets/plugins/jquery.maskedinput.js"></script>…
-
1
votes2
answers229
viewsQ: Creation of Masks with javascript
I need to create masks for some inputs that I have in the code, and had already asked about it, but I think the post was outdated and then was "forgotten". However what he had achieved with that…
-
0
votes1
answer50
viewsQ: Doubt about SQL in PHP
I am currently carrying out a work that needs to access the database, and I had a lot of difficulty in some darlings, among them the query of UPDATE. But after much searching I found a solution and…
-
2
votes3
answers17307
viewsQ: PHP give refresh on a page
There’s a way to give refresh to a page in my example: Page login > send data to the processa.php > sends to a menu Sometimes when it gets to the lawsuit, it gets "stuck" and then I wanted to…
phpasked programmer2016 545