Posts by adventistapr • 5,498 points
287 posts
-
1
votes1
answer45
viewsQ: Save a search result to a json_encode
I’m trying to record a result of a query in a json_encode and right after recording in a field in my BD, but I am getting an error message and could not solve the problem. What am I doing:…
-
1
votes0
answers81
viewsQ: Play values in an array
I’m trying to play some values in a session variable to later use it in a shopping cart, but I’m not getting it, the values are the id and the quantidade. What I did was this: The form: <form…
phpasked adventistapr 5,498 -
1
votes1
answer97
viewsQ: Redirect page with post using ajax
I know the question is very strange, but it is a need that we have, I need to move to another page some variables that I rescued, but it is not only pass but redirect the page as well. I can’t use a…
-
0
votes0
answers33
viewsQ: Error sending large volume email with Gmail and Phpmailer account
We have a script for sending emails, which may be few or many, depends on the need of our staff RH, I am unable to solve the problem and treat satisfactorily the error message being presented and…
-
1
votes0
answers39
viewsQ: User message with time and page forwarding killing session
I am trying to make a redirect after giving a message to the user, but the message is not being displayed and let alone the session being destroyed, I do not know exactly what is wrong, the code I…
phpasked adventistapr 5,498 -
1
votes1
answer27
viewsQ: Image occupying the entire monitor
I got a code right here on SO that largely solved the problem I have, I’m trying to let the image fit to various monitor resolutionssm the background is correct, the image is life size, but it gets…
cssasked adventistapr 5,498 -
0
votes0
answers133
viewsQ: Access denied for user
I’m trying to generate a few pages through a program called PHP Generator for MySQL and I am getting an error message that is not possible, the site access normally with the Host passed by the…
mysqlasked adventistapr 5,498 -
6
votes3
answers759
viewsQ: Center menu on page
I am trying to align the menu I have centrally, but the attempts I made were frustrated and my knowledge in css I tried to change it here: #topNav ul.nav>li.mega-menu { position: unset; } The css…
cssasked adventistapr 5,498 -
2
votes1
answer107
viewsQ: Pass parameter to template with Smarty
I’m reading the documentation from Smarty but I still can’t understand how I can and can pass parameter to a template using the Smarty. I have this piece of code: if ($part == PagePart::RecordCard…
-
1
votes1
answer64
viewsQ: How to format date variable in Smarty for dd/mm/YYYY
I’m trying to format a date on Smarty that is in that format {$Grid.Row.DataEmissao.DisplayValue} being displayed like this: 15-03-2018, how can I format it for 15/03/2018 to display in my report, I…
smartyasked adventistapr 5,498 -
3
votes4
answers132
viewsQ: Assign a value to a variable when the search return is NULL
I’m trying to assign a value to a variable when the search return is NULL, but I’m not getting it, when I check the value of the variable $IdSetor she is NULL and not zero, as I need. The research…
phpasked adventistapr 5,498 -
1
votes1
answer23
viewsQ: Calculation between inputs in table with dynamic line creation
I’m setting up a table where lines are created dynamic, on these lines I’m doing a field multiplication Qtde * VlrUnitVista and playing the value on the field VlrTotalVista and is working well, in…
javascriptasked adventistapr 5,498 -
0
votes2
answers91
viewsQ: Create associative array with other PHP arrays to use as JSON return
As an example, I’m going to use what I was given very simply, this Array will be obtained from data from a query of a BD: $S1 = [[0,100], [1,200], [2,700]]; $S2 = [[0,700], [1,300], [2,400]]; $Label…
-
0
votes0
answers619
viewsQ: Break page with mPDF when changing ID
I’m trying to break a page with mPDF and PHP by changing the ID of the record, my information is on a table, but I do not know how to do, because my attempts with the $mpdf->AddPage(); failed. I…
-
0
votes0
answers179
viewsQ: Delete empty lines at the end of a CSV file with PHP
Hi, I need a tip, I was making an import of a file on CSV to change a record in my database and strangely could not do it, I did an analysis in the code in PHP and it’s all right so I left for the…
-
1
votes0
answers115
viewsQ: Header image does not appear with print();
I have a problem and as simple as it seems I am not able to understand and therefore, solve it, my call the page was changed getting now this way, the same is so: $(function() {…
-
0
votes1
answer857
viewsQ: How to skip first line of csv file
I need to ignore the first line of a file I’m importing in csv with php, this first line is a header, some hint how can I do this? I tried to make an accountant, but I couldn’t fix it, what I have…
phpasked adventistapr 5,498 -
0
votes2
answers559
viewsA: Upload csv file with ajax, json, php and Mysql
The solution to my problem was solved as follows, following a few tips here from the OS, I re-read the form and the form of the submission. <form id="uploadForm" action="" method="post"…
-
0
votes2
answers559
viewsQ: Upload csv file with ajax, json, php and Mysql
I’m trying to make a import file csv to the MySQL dealing with errors with JSon but I’m not succeeding, even with a basic test I can return the message, always falls in the else of if. This is the…
-
2
votes2
answers1315
viewsA: How to use Try, catch, Finally and Exception in php
After some research and help from some friends I got what I needed and I come to share with you the final result, I hope I can help someone. Code commented, follows: // ATRIBUI UMA CONEXÃO PDO…
-
2
votes2
answers1315
viewsQ: How to use Try, catch, Finally and Exception in php
I’m with source where I need now adapt it to use the try, catch, finally and exception and I’m not getting it, this source already has some try´s with catch(PDOException $erro) where I do some…
-
1
votes1
answer77
viewsQ: Insert Mysql query value in a comma-separated array
I am trying to insert a result of a query made on MySql in a comma-separated array, but I’m having trouble doing so. I have this appointment: SELECT `gasUsuarioUnicoopSis`.IdUnicoop FROM…
-
4
votes2
answers4078
viewsQ: How to show date without time with Date()
I’m mounting a date to be displayed in an input, this will be today’s date less a day, but I need only the date and is showing me Date and Time, how can I do? What I got so far is this: var Hoje =…
javascriptasked adventistapr 5,498 -
5
votes3
answers2185
viewsQ: How to create and remove div s with inputs dynamically with jquery
I need to create and remove dynamically div´s for a form I have, already made using table, but now I was asked div´s. I tried to make an adaptation but I couldn’t, what I need is to create a button…
jqueryasked adventistapr 5,498 -
1
votes0
answers101
viewsQ: How to send ID saved in variable in Json return
I’m making a insert using a class but not being able to rescue the last id registered, need to save this id in a return variable json because I need it to make a new record, what I have is this:…
-
2
votes2
answers157
viewsA: Show launch tag when date is IS NOT NULL
I managed to solve my problem, discarded the second loop, entered the dates in the first select and now unique select, then did some checks before showing or not the tag launch, it was like this:…
phpanswered adventistapr 5,498 -
6
votes2
answers157
viewsQ: Show launch tag when date is IS NOT NULL
I’m trying to display a release tag and what seemed to be simple has turned out to be a complication. Product registration has two fields, data_inicial and data_expiração, initially make a select to…
phpasked adventistapr 5,498 -
2
votes1
answer876
viewsQ: Calculate Quantity x Price and play value in input and session
I am trying to play a calculation of total in an input and also in session in shopping cart that I am developing and am not succeeding, I will try to explain the problem I have. The inputs are like…
phpasked adventistapr 5,498 -
2
votes2
answers60
viewsQ: How to find a caraceter in the string and cut string to it and after it
I am trying, unsuccessfully to cut a string from a character contained in it, first I need to find the _ in the string, after finding it I need to cut the same one to it and after it to the ponto,…
phpasked adventistapr 5,498 -
0
votes2
answers134
viewsQ: How to merge several variables into one php and pass to Jquery in a link
I consulted on the subject and even managed to find some ways but nothing that could solve my case, I will try to be direct to facilitate. I have a table where I list some visits of some companies,…
-
1
votes1
answer97
viewsQ: Insert colored border into image that is cover
I’m trying to highlight a div who’s got a cover image with an edge using css, but I’m not getting it. I loop to show the images but the user can not know which image is the cover, the image below…
-
0
votes2
answers312
viewsQ: Subtract a day directly from CURRENT_DATE
I am using a framework that allows me to set the current date as default value, but now I need to show the user always the date yesterday, the code snippet as the value set is this: $editor = new…
-
1
votes2
answers990
viewsQ: When changing select call run query
I’m trying to change a script I have for weather forecast, but unsuccessfully, today the user selects an option in select and clicks the button to run the search, what I’m trying to do is use…
-
0
votes1
answer201
viewsQ: Show html table format in the email body in sending
I’m trying to show in the body of the email an html table with the products budgeted by the customer, but it’s going all disfigured. What I’m doing in shipping is this: $data_pedido = date("d-m-Y");…
phpasked adventistapr 5,498 -
3
votes2
answers433
viewsQ: Check if email is registered in the BD
I’m doing a search in my BD to verify the existence of email, avoiding the registration of the same again, but I’m having problem in return, the script below sends and treats the return. if…
-
0
votes1
answer65
viewsQ: Send print data to another page
I need to send some information to another page for printing, I have already been able to validate the information, but I don’t know how to call the other page and print the data provided by the…
-
0
votes1
answer1028
viewsQ: Save array values to Mysql
I am trying unsuccessfully to record some information in my database, I have a table where the user will insert lines according to their need, but when sending the information to the database is…
-
0
votes2
answers280
viewsQ: Right at the top when resizing page
I’m trying to put the company logo above all content at the moment the page is resized, but without success. Logo call: <a class="logo pull-left" href="index.php"> <img…
htmlasked adventistapr 5,498 -
1
votes1
answer204
viewsQ: After php query open result on a new page
How can I, if you have how, open a new page after returning a query on php, what I have today is this here: $(function () { $("#frmConsulta").validate({ submitHandler: function (form) { var data =…
-
1
votes2
answers257
viewsQ: Concatenate variables in Jquery to send php only from the selected record
I have a loop where I show the user the result of a query, each query has 3 variáveis that I need to send to php, what I’m trying to do is send php the variables that correspond to the button…
-
1
votes1
answer1683
viewsQ: How to count rows from a table with PDO
I’m trying to get the number of lines a Select to show or not some messages to the user, but all possible attempts did not return me the correct result. What I’m using is a William Francisco Leite…
-
1
votes3
answers242
viewsQ: How to enable click on entire cell of a table opening file on a new page
I’m trying to adapt a code that should do the following, by clicking a cell of a table trigger the link by opening the file in a new browser window, what I have so far is this, on tr of table one…
-
2
votes1
answer125
viewsQ: Record communication data of the person
I’m trying to record in my BD communication data of a person and I am not able to solve, the data of this communication are Email, Telefone Empresa, Celular Empresa and Ramal, each of these are…
phpasked adventistapr 5,498 -
0
votes1
answer466
viewsA: Redirect user by ending php session with Jquery
Following the Everson tip, I did it like this, in php it was like this, after changing the password: // DESTRUINDO A SESSÃO session_start(); session_unset(); session_destroy();…
-
0
votes1
answer466
viewsQ: Redirect user by ending php session with Jquery
I’m trying to close a sessão php and redirect a user after password exchange to force new login on the return of an action, the redirect is taking place but I don’t know exactly how to end the…
-
1
votes2
answers89
viewsA: How to rescue large amount of variables sent by POST and use them?
I managed to solve in a simple way, following a tip from Anderson Carlos Woss the code was like this: Extract($_POST, EXTR_PREFIX_SAME, "c"); The above code, if there is a variable with the same…
-
0
votes2
answers89
viewsQ: How to rescue large amount of variables sent by POST and use them?
I have a problem rescuing large amount of variables sent by the method $_POST. I was using this code earlier: import_request_variables("gp", "rvar_"); But the same was discontinued and my script…
-
0
votes0
answers372
viewsQ: Check PDO query return to delete or insert records
I’m making a select for deletar or inserir records in my bd according to the amount of records returned, but the tests I have done are not correct, I do not know exactly how to count the records in…
-
1
votes1
answer44
viewsQ: Montart loop with variables for PDO exclusion
After a filter I have this form with the users and their services, what I am trying to do is send the information to delete the records with the parameters set in the form, in case it would be the…
-
1
votes1
answer451
viewsQ: Calculation with comma in Javascript
I am redoing a system of Agricultural Measurement and I am finding it difficult to perform some calculations, initially prepared the input´s to receive only números, then I formatted them to receive…
javascriptasked adventistapr 5,498