Posts by Diego • 4,520 points
159 posts
-
1
votes1
answer48
viewsA: Through a form - Get the phone key
Via HTML, HTML5, JS or any other language/method per browser, it is impossible. Via app, using android studio, here’s a way.…
-
2
votes1
answer40
viewsA: Button playing the same role of browser arrow
Yes, in this way: <input type = 'button' value = "Voltar" onclick = 'javascript:history.back(-1)'>
-
0
votes1
answer316
viewsQ: Empty string return - Oracle
I have a table with a string and several fields separated by | (pipe) I need to bring each field in a column. I even got a way, the problem is that when a record does not have the field filled the…
-
4
votes1
answer179
viewsA: Character SET and Character Encoding - What are they, what are they for?
Basically: Charset: Character set you can use. Encoding: This is how these characters are stored in memory. I suggest reading the source, this topic on Soen. Or else that article.…
character-encodinganswered Diego 4,520 -
1
votes1
answer81
viewsA: Problem Form - I think they put a BOT
Without going into code details, I think the ideal would be for you to do the following: 1º - Validate sending with captcha: Do not need to leave in definitive, but implant and accompany for a…
-
0
votes2
answers206
viewsQ: Sum int with date - PHP
I have the function below, which makes the date sum, with the value +2 days fixed: echo date('d/m/Y', strtotime("+2 days",strtotime($ultima_data))); It sums correctly with the value of $last date,…
-
23
votes1
answer2609
viewsA: What is a "stateless protocol" like HTTP?
In computing, a stateless protocol (stateless) is a communication protocol that considers each request as an independent transaction that is not related to any previous request, so that the…
-
4
votes2
answers665
viewsQ: Sum date with int
I’m trying to make a sum of days, informed in a field int,with a field date using SQL. I tested it as follows, but it sums up the day, but ignores month and year. Is there any way to make that sum?…
-
1
votes3
answers6726
viewsA: Return to Previous Page when Error
Try this: <?php include("config.php"); $email = $_POST["e-mail"]; $opcao = $_POST["opcao"]; $codigo = md5($email); if($email == ""){ echo "<script>alert('Por favor, digite um email…
-
1
votes1
answer595
viewsA: Open Jfilechooser with filled "File Name" field
You need to use the method setSelectedFile JFileChooser jFileChooser = new JFileChooser(); jFileChooser.setSelectedFile(new File("fileToSave.txt")); jFileChooser.showSaveDialog(parent); Source…
-
2
votes1
answer1255
viewsQ: Foreach Ajax for combo
I have the following Ajax snippet to feed text or select input with already defined values: ids.forEach(function (id) { document.getElementById(id).value = dados[id]; }); I wonder if you have how to…
-
0
votes1
answer457
viewsQ: Champ inconnu error dans on clause - SQL
I have the following situation, with 3 tables: ocorrencias: Has 6 columns: tipo_falha_1 until tipo_falha_6. It’s a two-digit code, from 1 to 20. tipo_falha: Has a description of the faults. The…
-
1
votes1
answer61
views -
2
votes1
answer62
viewsA: Left Join repeat tables
To whom it may interest, I have decided as follows (here are 3 items): SELECT P1.DESCRICAO AS desc1, P2.DESCRICAO AS desc2, P3.DESCRICAO AS desc3 FROM ocorrencias o LEFT JOIN pecas P1 on…
-
1
votes1
answer62
viewsQ: Left Join repeat tables
I’m trying to assemble a select that has the result below: With select below I can show the null in just one column. How could I make it work for 20? I have from item_1 to item_20 and the…
-
3
votes1
answer253
viewsQ: Doubt mysql and Left Join
I have the SQL below, which returns data that I will fill in some inputs of a form. The problem is that I have 20 items (pieces) in this table, but it may be empty because the user can fill any…
-
2
votes0
answers185
viewsQ: onChange function does not work when applied to multiple fields
Use the function onChange="getPeca(1);", where is accessed a JS that feeds the field to the side with the description. This works, if I directly in the field and enter the code and give tab it does…
-
2
votes2
answers5990
viewsA: Is it possible to send email with xampp from a local server?
Yes, because I use it here. Just edit in php.ini pointing to any email server you use: [mail function] ; For Win32 only. ; http://php.net/smtp //MEU IP INTERNO, MAS PODE USAR O SMTP DO GMAIL, YAHOO,…
-
1
votes3
answers556
viewsQ: Pass multiple variables in Ajax function
REPEATED QUESTION TO FACILITATE THE EXAMPLE I have the following inputs in an HTML (I will show 3, but the actual situation is 20): <tr> <td>Digite o código:</td>…
-
0
votes1
answer33
viewsQ: Remove Timepicker fields
I’m trying to remove the second, millisecond and Timezone fields but I can’t. I checked the documentation, I put showTimezone: false but still appears. How can I proceed? Code that I’m using:…
-
2
votes2
answers92
viewsA: problem when converting text to lowercase
No need to use function, use so direct input: onkeyUP="this.value = this.value.toUpperCase()" Using Ajax, allows editing anywhere in the field without skipping the cursor: $(document).ready(…
-
2
votes1
answer819
viewsA: Calculate import time of DUMP
It is possible to monitor time using this query: col table_name format a30 select substr(sql_text, instr(sql_text,'"')+1, instr(sql_text,'"', 1, 2)-instr(sql_text,'"')-1) table_name, rows_processed,…
-
0
votes1
answer163
viewsQ: Javascript blocking required
I’m having a strange problem. I added the function below to prevent the user from clicking more than once on Submit. But from the moment I added her, the required HTML5 and validate() stopped…
-
2
votes1
answer164
viewsA: Check checkbox data that has variable names
Would you create one input Hidden together at the time of creating the checkboxes. Ai on the next page you get all Hidden, but there just compare with the checkbox. I find this method easier.…
-
3
votes1
answer226
viewsQ: Clear field after X time
I have the form below, that after 2 minutes it updates every page: With the command below: <meta HTTP-EQUIV="refresh" CONTENT="120;URL=http://pcn-sig.peccin.local/cracha"> And with that he…
-
1
votes2
answers458
viewsA: Require input text filling with jQuery Validator
The most "easy" would be to use the required HTML5, but it will make all fields mandatory. <input type="text" name="produto_preco_p" id="produto_preco_p" class="form-control" value="<?=…
-
3
votes1
answer293
viewsA: Create a download link for path that is in mysql
If the files whose pathReunion points are in apache, it is relatively simple to create a hyperlink: <td> <?php echo '<a…
-
1
votes1
answer113
viewsA: Blocking LINK with HTACCESS
Instead of blocking, I believe that the ideal would be to redirect. If the link is accessed, directs to any other page: # MAINTENANCE-PAGE REDIRECT <ifModule mod_rewrite.c> RewriteEngine on…
-
1
votes0
answers126
viewsQ: Ajax error - unexpected end of data
I’m trying to figure out what’s going on with the ajax code below. If the string comes with data, it works correctly, but if it comes empty, error occurs: JSON.parse: Unexpected end of data at line…
-
0
votes4
answers114
viewsA: How to make a query that returns the last record of each day?
Try to use: SELECT max(valor1) FROM tabela GROUP BY DATE(data)
-
0
votes2
answers560
viewsA: Rescue data from checkbox stored in the bank
Solved by editing the ajax: I declared the checkbox ids separately: var ids2 = ["export_dizeres[1]", "export_dizeres[2]", "export_dizeres[3]","export_dizeres[4]", "export_dizeres[5]",…
-
2
votes2
answers560
viewsQ: Rescue data from checkbox stored in the bank
I am recording data from 6 checkboxes in the database. I am treating each one separately, as below: <tr> <td>Tabela Nutricional:</td> <td><input type="checkbox"…
-
3
votes3
answers1304
viewsA: Download HTML link from the bank
Resolved as follows: <td><input type="text" name="anexo" id = "anexo" size = "65" readonly = "true" onclick="location.href=this.value;" /></td> When I click on the field, the…
-
5
votes3
answers1304
viewsQ: Download HTML link from the bank
I am recording an address in the bank and with ajax I search it for display to the user. Provisionally, I am recording it in the input below: <tr> <td>Download:</td>…
-
2
votes1
answer171
viewsQ: Doubt with checkbox and PHP
I have 2 fields, as below, which are checkboxes: <tr> <td>Dizeres Legais:</td> <td><input type="checkbox" name="export_dizeres[]" value="PORTUGUES"> Português <input…
-
4
votes1
answer7391
viewsQ: Access by Phpmyadmin ip
Inside the folder c: wamp alias phpmyadmin.conf there is the line below to free phpmyadmin access for all machines in the network: <IfDefine APACHE24> Require all granted I wonder if there is…
-
2
votes2
answers195
viewsA: How to check data range?
I decided as follows: SELECT count(*) as flag FROM HORARIOS H WHERE EXISTS ( SELECT * FROM RESERVAS R WHERE H.COD BETWEEN R.COD_HORA_SAIDA AND R.COD_HORA_PREVISTA-1 AND R.COD_VEICULO = 2 AND…
-
1
votes1
answer46
viewsQ: PDO does not return Count
I need to store the result count, but apparently with PDO I can’t store the value. I’ve already select on the outside and the result comes, because I can’t store in the variable $flag the result?…
-
8
votes2
answers195
viewsQ: How to check data range?
When requesting a vehicle reservation, the system inserts the scheduled departure and return time code (we prefer to work with fixed codes instead of schedules in order to facilitate programming).…
-
4
votes2
answers1947
viewsA: Stress problem PHP and Mysql
I resolved so: <td><?php echo utf8_decode($saida['setor']) ?></td>
-
-2
votes2
answers1947
viewsQ: Stress problem PHP and Mysql
I have a question regarding accentuation, specifically the return of Ç. My bank has the collation latin1_swedish_ci, I’m using the HTML tags: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0…
-
2
votes1
answer34
viewsQ: Difficulty with PDO
I’m starting with the use of PDO and I have a doubt that I could not solve. I do the select below that will return me 2 hours: $sqlSaida = 'SELECT horario FROM HORARIOS WHERE COD = :codsaida UNION…
-
1
votes0
answers55
viewsQ: Format Mysql data
I have a problem when passing a date to a select. Using the form below, select me returns the data normally: SELECT H.* FROM HORARIOS H WHERE NOT EXISTS ( SELECT * FROM RESERVAS R WHERE H.COD…
-
1
votes1
answer201
viewsA: Mysql query ranges
If someone goes through a similar problem, the solution was this: SELECT * FROM HORARIO H WHERE NOT EXISTS ( SELECT * FROM RESERVA R WHERE H.COD BETWEEN R.SAIDA AND R.RETORNO-1) ORDER BY H.COD Thank…
-
3
votes1
answer201
viewsQ: Mysql query ranges
I need to assemble a select, where I need to display the results outside a code range. For example: I have code 2 as the beginning and code 6 as the end, how could I not display the codes 3, 4 and 5…
-
2
votes0
answers356
viewsQ: Select dependent with three levels
I am setting up a simple system of booking vehicles for the company and I need to assemble a "triple" combo that will check the vehicle and the available schedules for it. I set up a double of the…
-
1
votes2
answers505
viewsQ: Set value for combo with Ajax
I use the script below to feed some text fields with Oracle database values. But a situation has arisen in which I need to feed a combination of two values (ACTIVE and INACTIVE). In Ajax below, it…
-
0
votes2
answers8159
viewsQ: Type only letters and dots
I’m developing a page with a login and password that searches the data in the company’s AD. I am using PHP and need to somehow allow only letters and dot (.) in the login field. I’m using the script…
javascriptasked Diego 4,520 -
12
votes2
answers516
viewsQ: All keys work as enter
I’m developing a small PHP system where the user just passes a badge and presses enter. Somehow I need to make this enter be automatic after a few seconds (the button is already in Focus after…
javascriptasked Diego 4,520 -
0
votes2
answers6568
viewsA: Connect PHP with Oracle
If you haven’t found a solution yet, see the following: - Uncomment Extension=php_oci8.dll Extension=php_oci8_11g.dll Extension=php_pdo_oci.dll in php.ini - Install client 11g, administrator mode -…