Posts by denis • 366 points
69 posts
-
0
votes1
answer16
viewsQ: Download CSV file in WEB directory
I am trying to download a CSV file in the directory but it is downloaded in . TXT Unsuccessful attempts (PHP 7.1) header('Content-type: text/csv; charset=UTF-8') header("Content-Type:…
-
0
votes0
answers323
viewsQ: Simple paging with Javascript
I made a system to list billets consuming a API, but I need to generate a simple pagination (< Previous Next >) by passing the parameter "lastEvaluated" in the GET. If this parameter exists,…
-
5
votes1
answer174
viewsQ: Show DIV content by clicking on the image with slideToggle
I’m trying to get a click on an image in question to hide the previous title and show the current one, and so on. I’ve tried using nextAll, return false etc, but I think the problem is nesting…
-
0
votes1
answer37
views -
-1
votes2
answers62
viewsQ: Separate and print Object items in HTML
I have this script: var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { var txt = this.responseText; var obj =…
-
0
votes0
answers21
viewsQ: Convert operation result to thousands in PHP
Good afternoon. I cannot convert the result of my function to thousands, I have tried to convert with some native functions of PHP unsuccessful. function CafeGenerator() { $data_inicial =…
-
-2
votes2
answers90
viewsA: Foreach returns nothing back
Use the following function php to convert stdClass for array get_object_vars($data)
-
3
votes1
answer160
viewsA: How to control the size of cells in an HTML table?
To do this you need to specify a fixed width size on table and then determine what you need in the td guy: table { max-width: 90px; } td { width: 25px; }…
-
4
votes2
answers316
viewsQ: Autofocus for next field with Javascript + Maxlength
I’m trying to go to the next form field however the INPUTS are inside DIVS and I can’t make it work. It only works without DIVS, I’ve tried several combinations in the script and nothing. Script:…
javascriptasked denis 366 -
0
votes2
answers44
views -
0
votes1
answer64
views -
0
votes2
answers117
viewsA: Have side-by-side elements
I think just line up with margin-top is what I did. #view_patient { width: 44em; margin: 0 auto; } #table_info { display: block; float: left; margin-top: 65px; } #print_boneco { display: block;…
-
1
votes1
answer40
viewsA: Is it possible to press a button on a form and it takes the $_POST from the other form?
Put all the fields you want to register inside the same form: Example: <form action="/action_page.php" method="POST"> Cliente:<br> <input type="text" name="cliente"> <br>…
-
1
votes1
answer26
viewsQ: Add value to a reference value determined each different day for the whole year
How can I add a certain value to an existing value each day other than the year. Something like: $hoje = date('Y-m-d'); $amanha = date('Y-m-d', strtotime($hoje .' +1 day')); if ($hoje != $amanha) {…
-
0
votes2
answers295
views -
0
votes2
answers400
viewsQ: Add to MYSQL query in varchar field by deleting Strings
How to add directly to the query MYSQL when the field is sweep and need to delete some strings. Example: +------------+ |valor_total | +------------+ |R$ 2.277,90 | |R$ 3.217,30 | |R$ 9.857,40 |…
-
0
votes4
answers2249
viewsA: Create Virtualhost on port 81
I think all that’s left is to bug the httpd.conf file Listen 0.0.0.0:81 For access change the door after the (2 points) Ex: http://localhost:81 http://localhost:82 To work on all network machines…
-
1
votes1
answer234
viewsQ: Get value passed by Aria-Controls (Bootstrap tab panel)
How can I get the value passed by Aria-Controls of Bootstrap tab panel to compare from an Array of data to bring only the products of the category in question. Where to start the Javascript? This…
-
0
votes1
answer533
viewsA: Pass collected values at the click of the button to php variable
I don’t know if this is what you want but it can be a start. Note that this example needs a mandatory parameter which in this case is the value. You can switch the checkbox to your button if that’s…
-
3
votes2
answers460
viewsQ: Generate CSV with side-by-side results in PHP
I’m trying to get comparative results on a CSV generated in the php but I can’t stack side by side the way EXPECTED RESULT of the attached image. I made a code below that did not break the line when…
-
0
votes2
answers57
viewsQ: Sort VARCHAR database records with semicolon
How can I sort recorded database records as SWEEP. I tried unsuccessfully the code below. How can I format to get the expected order? SELECT *, CAST(representantes_vendas.valor AS INT) FROM…
-
0
votes2
answers309
viewsQ: Include numbers to complete numeric sequence in PHP
In this case I have the result in MYSQL. 01 03 06 09 I need to complete with the number correct sequence up to digit 12. Example: 01 02 03 04 05 06 07 08 09 10 11 12…
-
3
votes4
answers765
viewsQ: Numeric sequence loop in PHP
Good morning I have the result in MYSQL 01 03 04 06 11 I need a solution that fills with 2 zeros where the numerical sequence loses until the number 12. Example: 01 00 03 04 00 06 00 00 00 00 11 00…
-
0
votes1
answer3324
viewsQ: Compare records between two tables in MYSQL
I need a solution to compare any changes in the table products_csv in relation to table products even if it is only the exchange of a (letter or number) in some field. I am using the code below but…
-
0
votes2
answers5173
viewsA: Check if you returned records in select PHP
With a builder if da para fazer. $sql = mysqli_query($conn,"SELECT * FROM USUARIOS;"); $linhas=mysqli_num_rows($sql); if( $linhas > 0 ) : echo".<h5>."$linhas registros…
-
5
votes3
answers1217
views -
0
votes0
answers116
viewsQ: SQL needs CAST to return values in query
Gentlemen I manage an application PHP which uses SQL Server 2008 database. After a server migration from the database queries only work by converting with CAST and selecting one by one on SELECT.…
-
1
votes1
answer1226
viewsA: Configure web.config file for PHP project in subdirectories
I managed to solve it this way: (With asterisks after bar) <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule…
-
1
votes1
answer1226
viewsQ: Configure web.config file for PHP project in subdirectories
I have a website on php in test phase in a directory above the root of the official website. To configure the friendly URL (remove the entension . php) is for web config.. I made a rule that doesn’t…
-
-2
votes2
answers66
viewsQ: How to change the delimiter of the Php array obtained via POST by replacing the comma?
I receive an array via POST which is generated from a field name="Referencia[]" of the form, the problem is that in this array there is information with comma. Example: 2.7 cm, 3.1 cm. I enter in…
-
1
votes2
answers1768
viewsA: Dynamically Change Field
This example uses Jquery 1.9.1 Adapted from http://jsfiddle.net/HZ3t7/3/ $("input[name=f_name]").on('keyup', function () { $('#first_name').html($(this).val()); }); <script…
-
5
votes2
answers616
viewsQ: Delete placeholder value in input by clicking Angularjs
Does anyone know how I can erase the value of placeholder by clicking on the field using only Angularjs? Example: When you click, automatically add the word name. <input type="text"…
-
1
votes2
answers3045
viewsA: Format PT BR date and time return in PHP
Because the server does not support multiple functions by using version of PHP old, I’ll post how I resolved to eventually help someone who might have the same problem. As my friend Daniel says,…
-
0
votes2
answers3045
viewsQ: Format PT BR date and time return in PHP
I’m using the function strtotime of PHP to format the date that come in the database SQL SERVER and is working normally on the local server, but on the web returns the date 12-31-1969 21:00 PM.…
-
1
votes2
answers1170
viewsQ: How to check whether an image (physical file) exists on an external web server via an absolute URL
I usually use the function file_exists of PHP to do this when I am developing remotely, but now I need to know when the image exists or not in a URL absolute of an external web server. Editing the…
-
0
votes0
answers234
viewsQ: Compare values in two tables with php and Mysqli
I have to compare if the numbers in table A exist in table B and if it exists it makes one instruction or another. I tried that and it didn’t work. Note: In table B there may not be codigo table A…
-
0
votes0
answers40
viewsQ: Pass values from a checkbox in an array populate the unchecked with some value
I’m trying to pass values checkbox in a array, but the unchecked fields did not populate the array. I need to fill in the unchecked fields with the value "N" for example: Example in a loop of 5…
-
3
votes1
answer191
viewsQ: Format json output by separating in commas
I have an object json and I want to divide the result in commas. Example: 01,02,03,04,05 Object json: [{"rank":"0102030405"}] HTML output script $.each(data, function() {…
javascriptasked denis 366 -
2
votes2
answers139
viewsA: Problem Code UPDATE MYSQL PHP
To be executed. $query = "UPDATE player SET paymoney='10000' WHERE name ='$name'"; $suaconexao -> query($query);
-
1
votes3
answers582
views -
0
votes1
answer312
views -
0
votes3
answers708
viewsA: How to check the return of a function
I use this code, works well and reports errors. if(!$email->Send()) : $mensagemRetorno = 'Erro ao enviar formulário: '. print($email->ErrorInfo); else : echo"<script>alert ('Email…
-
2
votes3
answers4847
viewsA: INSERT inside a SELECT - SQL Server
Try that way without VALUES INSERT INTO TabelaExemplo (IdTabelaExemplo) SELECT IdTabela FROM Tabela WHERE IdTabela > 10 Reference: http://www.w3schools.com/sql/sql_insert_into_select.asp…
-
1
votes0
answers209
viewsQ: Compare the number of occurrences of an Array in Javascript dynamic fields before submitting form data
How can I compare the number of occurrences of Array in dynamic fields Javascript before sending the form data. I need to check if both are equal. I can do it only after sending with the function…
-
-1
votes2
answers125
viewsA: Recover scandir images from PHP and print incrementing according to the number of occurrences
Thanks for the suggestion Daniel, but I ended up solving it in another way. It is not the most elegant but it worked both to print and to change the files. <?php //select para obter a referencia…
-
0
votes2
answers125
viewsQ: Recover scandir images from PHP and print incrementing according to the number of occurrences
I need to recover images from a folder and I only have the reference number recorded in the database. I also have to create an increment, because for each reference can have n images. Combining the…
-
0
votes1
answer53
viewsQ: Delete a certain value from a comma-separated database field and reinsert again
I need to delete a value from a comma-separated database field and reinsert again. With the function str_replace PHP can delete all but the first or last one, because there is always a comma left. I…
-
1
votes4
answers660
viewsA: Getting PHP variables via Javascript without reloading page
I decided to create a id for each "a" with the variable itself $others_refs as proposed in the comment. Further I would like to another answer that does not apply the script tag inside the loop,…
-
-1
votes4
answers660
viewsQ: Getting PHP variables via Javascript without reloading page
I’m trying to pass on the results of foreach for <span id="mostra_ref"> mouse click, but this way is passing only the last value of the function explode, even the script being inside the…
-
4
votes1
answer1711
viewsQ: Javascript 12 to 24 hour format
I have a digital Javascript clock that is printing 1/12 hours. How to convert to 13/24. <script> function relogio() { var d = new Date() var t = d.toLocaleTimeString()…
javascriptasked denis 366