Posts by Gnomo Escalate • 378 points
34 posts
-
0
votes2
answers121
viewsA: Query to PHP database with WHERE does not return value
Since the return happens without the where and its variable is passing the value, what I can think is in the form that was inserted the variable in sql, to test the background give a echo($query)…
-
-3
votes1
answer95
viewsA: How to sum several numbers of various inputs in php
Starts by changing the line where the fields are creating leaving it so: echo "<input type='number' id='$x' name='numero[]'>The number is: $x <br>"; So the sainda of the values(typed…
-
0
votes1
answer58
viewsA: How to recreate a PHP session without loaning the user
It’s quite simple, you remove the session and create another, within the image upload function. // Amrazena a imagem antiga para você poder deletar da pasta; $imagemantiga = $_SESSION['fotoUser'];…
-
0
votes1
answer53
viewsA: Upload Images with PHP + Mysql
I’ve been there, I’ll try to explain what the problem is. What causes this problem is the fact that when you update the data without the image, you are running your code with the image variable…
-
0
votes1
answer47
viewsA: View data from fetch array in modal - PHP
Your case is the same case of this user here, ids can not repeat themselves, see the solution How to pass an id through a modal window, it happens that in both cases you are repeating the id of the…
-
-1
votes2
answers200
viewsA: What are attributes in PHP? (Annotations/Attributes/Decorators)
It is called docblock or Docblock that is used to document your code. This post explains well what its purpose is Phpdoc - What is, what is useful and how to use? . The use of it has become popular…
-
0
votes1
answer40
viewsA: PHP- How to pass an id through a modal window
This is happening due to your code organization, ids cannot repeat themselves, in your loop when you click to delete the third itém, for example, in fact you are calling the first modal of the…
-
0
votes1
answer467
viewsA: fopen: failed to open stream: No such file or directory
Assuming your txt has the following structure: João,[email protected],125 Maria,[email protected],123 First in the form you need to add enctype="multipart/form-data" as an attribute for you to send…
-
-1
votes1
answer336
viewsA: Download pdf file from php error
The problem above was in the location of the code responsible for the download, as there was html below the code the same would download all the content of the page, it was indicated in the comments…
-
1
votes1
answer67
viewsA: Jquery to open PHP loop div
The first problem is that you are using an id(id="btn-open-task") as selector on your button, ids cannot repeat themselves, so switch to a class, can be with the same name. The path to your problem…
-
0
votes1
answer27
viewsA: Feed div that were dynamically created
Try this, you already insert your div and content at the same time. for (i = 1; i <= totalLoop; i++) { $.ajax({ url: 'receitas/titulo'+i+'.txt', dataType: 'text', success : function (resposta) {…
jqueryanswered Gnomo Escalate 378 -
0
votes1
answer94
viewsA: Fullcalendar Uncaught Syntaxerror: Invalid or Unexpected token in description when skipping line
The first treats the line break coming out of your textarea to save in the bank, if you want you can put a <br> in str_replace. public function trataQuebra($texto){ $processa_texto =…
-
0
votes1
answer57
viewsA: How to "shuffle" multiple Divs?
I found this example here http://jsfiddle.net/BwJHj/1/ I applied in your code, see below if this meets you. var cards = $(".q"); for(var i = 0; i < cards.length; i++){ var target =…
-
1
votes1
answer75
viewsA: How do I enable Hover without creating a css file?
As stated above, it is not possible to create pseudo classes in the inline style, that is, the style that is applied directly to the tag. But in your HTML file between the tags head(is indicated to…
-
-1
votes1
answer55
viewsA: getInfo always receiving the same information. How to resolve?
I could think of something like that, but I can’t test it now. Take a look if it helps. An observation, it may be that in the fields type number in the place of being field1,field2, the value is…
-
0
votes2
answers45
viewsA: Check empty PHP array
An idea for your problem check the value of $valorDesconto if it is greater than 0, assuming that array_push be inside while, for or something like. $valorDesconto = ($valorDesconto > '0.00') ?…
-
0
votes1
answer47
viewsA: If you click on the displayed ID, it opens another page with a pre-filled form with the information
You’ve done a lot of the way. One of the most used ways is to send the ID via $_GET, and recover the data on the other screen, in your case the form screen. Your link would look like this:…
-
0
votes1
answer43
viewsA: Show records, via PHP and Mysql query, in two tables, with GROUP BY
As I said in the comment, you can try to group by more than one column, so you can show the two results of João.The results will be grouped first by col1(u_first_name) and then by col2(w.city). In…
-
0
votes1
answer22
viewsA: Send a copy of the form to the company and to the customer
When I need to do this, I put the emails separated by commas, the function mail(); take it very well. $to = "[email protected],[email protected]";
-
0
votes1
answer25
viewsA: Export values from a php array to a . csv by inserting each value into a cell
See if this will work, I believe it’s a matter of putting one more foreach in his array has 3 levels. function convert_data_to_csv( $data ) { $content = array(); foreach ( $data as $array ) {…
-
0
votes3
answers364
viewsA: How to overwrite a root HTACCESS in a subfolder with another HTACCESS
Usually in the subfolders I use so, add the folder name in Rewritebase: RewriteEngine On RewriteBase /nomedapasta/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule…
-
0
votes3
answers91
viewsA: Edit only one table row
To select only one record You need to specify a condition using the WHERE clause, this condition in your case may be the ID field. Remembering that I’m not worried about code security: $id =…
-
0
votes1
answer37
viewsA: Separate MYSQL results by specific field for email triggering
Try the following way, turn the email into the key of your array for you to group the other data by this key: $emails_de_envio[$row_notifica_venda['EMAIL']][] =…
-
0
votes1
answer82
viewsA: Doubt Autocomplete with . Blur
This would be the solution using the two fields separately, taking into account the information that the product may not have a barcode attached, so if you search by name fills the fields and if you…
-
0
votes2
answers56
viewsQ: Question about GIT and how to use an existing project on the server?
I’m currently getting into the git method, and I’ve really liked the way the development flows. But I ran into a problem. I have several projects that are already on their proper servers, sent via…
-
0
votes2
answers514
viewsA: Delete image from BD and Folder
As the friend said there in the comments you need to make a select on the photo before removing from the bank, more or less like this. $id = $_GET["id"]; if($_SERVER["REQUEST_METHOD"] == "POST"){…
-
0
votes1
answer39
viewsA: List Database Result by Rows and Columns
In the end I arrived at the following solution, starting from the suggestion of the above comments and looking for a solution of pivot Tables: SELECT user, max(case when periodo = '92020' then…
-
0
votes1
answer39
viewsQ: List Database Result by Rows and Columns
I have the following problem, I need to create a report with data coming from the database, listed by rows and columns, in the format below: +----------+-----------+-----------+-----------+ | |…
-
0
votes1
answer121
viewsA: Upload files to separate folders in the database
Hello, my dear. Answering your question: My question is what would be the best way to do this? Saving them in the MYSQL database or saving them in a folder on the server? In my view both. I would…
-
0
votes4
answers949
viewsA: Change select element value (Ajax + php) with innerHTML
I’ve had a similar problem, and if it’s the same as mine, your problem is in the Selectpicker refresh and not the return, I’m assuming you’re using the Selectpicker(bootstrap-select). See if it…
-
0
votes2
answers47
viewsQ: Open Modal with Delay and After Closed No More
I’m trying to create a modal bootstrap as a one-page greeting screen. The part of it open with delay I managed to do without problems, but I need that when the user closes it, it will not be shown…
-
0
votes1
answer164
viewsQ: Summing Values of an Array Grouping by Key
I posted a question here this week, but it was negative for lack of more information, from then on I ended up solving the problem in question, so I will leave here the solution I found and if you…
-
0
votes2
answers52
viewsA: How to include all my pages within one?
I may be wrong but I think your mistake is here: echo '<div class="page-card"> <h1 class="title">'.$rows['nome_categoria'].'</h1> '.include('pages/'.$rows['categoria'].'.php').'…
-
0
votes1
answer156
viewsQ: Sql Father and Children in the Same Table
I have the following question, I have a table in the bank that cannot be changed to facilitate the process. In this table I have records parents and children with the possibility of up to 8 levels.…