Posts by KevinF • 1,332 points
101 posts
-
1
votes1
answer72
viewsQ: Validate value of a select
<label>Itinerário</label> <select id="itinerario" name="itinerario" class="form-control form-control-sm" required readonly> <option value="" selected>Selecione um…
-
0
votes1
answer116
viewsQ: Edge some of thead th when giving scroll (scroll page)
Currently I have a table fixing the thead th at the top of div, but when scrolling (scrolling the page) add the edges of the th. I need that when giving scroll continue with the edges.…
-
1
votes1
answer169
viewsQ: Jquery validation input Multiple file
Currently valid only file extension on input file, need valid a file multiple. Code I have so far: Html <label>Arquivos .XML<br> <input type="file" multiple name="arquivoXML[]"…
-
7
votes4
answers4894
viewsA: PHP returning wrong current time
In the php.ini file you have to change the Timezone. If you use Xampp you can find the file in xampp php.ini Just change the line below or add it, after that restart Xampp apache and try again.…
-
0
votes1
answer394
views -
0
votes2
answers294
viewsA: Group data into a php table
I solved the problem with the code below: <?php $i = 0; foreach($class->Lista($empresa,$fatura) as $dados) { $i++; $CdOE[0] = 0; $CdFatura[$i] = $dados->getFatura(); $NrNFSe[$i] =…
-
0
votes2
answers294
viewsQ: Group data into a php table
My need is to group the notes in a single row where the OE are repeated for example: My code below: <?php foreach($class->Lista($empresa,$fatura) as $dados) { $CdFatura =…
-
1
votes1
answer357
viewsQ: Save input data without Submit
My problem is that I am making a register of companies, in this register I have the field Branch of activities that has a combo with the branches of activities registered in the database, the…
-
1
votes2
answers1161
viewsQ: Show button when checking checkbox
I need you to mark the checkbox the Submit button appears. However as I have more than one checkbox when clicking the second to mark the button some would like to continue appearing the button until…
-
0
votes1
answer21
viewsQ: Onfocus input change type and assign a value at the same time
Hello, I have the following code. What I have today is that by clicking on input he changes the input to date, but I would like to click it to continue changing and assign a date, I have tried to…
-
1
votes2
answers157
viewsQ: Paint input by clicking the checkbox
I need you to click on checkbox paint the background of tr and input. In the code below it paints only the background of tr and clicking anywhere from tr. <html> <head> <script…
-
-1
votes1
answer77
viewsQ: Foreach in sending emails
Node code below sending an email to a particular recipient however need by the number of invoices all in the same, in the code below it creates an email for each invoice. I commented on the code…
-
0
votes2
answers213
viewsQ: Validation POST php array
Below a table in my view, I need that when marking the column in the checkbox is not sent the data to my other page, or do a check when searching the POST. View: <div class="large-12 columns"…
-
0
votes1
answer605
viewsQ: How to query select and call the connection from within
I need help for my dao structure, as I call the connection, how I select within the function and how I list in my main the information coming from select. As it is so far: Connection to the bank.…
-
1
votes2
answers31
viewsQ: Error comparing php array
$rua[] = {1,1,2,2,2,2}; $countRua = count($rua, COUNT_RECURSIVE); for ($i=0; $i < $countRua; $i++) { if ($rua[$i] == $rua[$i+1]) { } } I own the for up through a array and validating if the…
-
1
votes1
answer2081
viewsQ: Fix thead while scrolling table
I own the table below would like to make a scroll on it and pin to thead rolling down. HTML code so far: <div class="row"> <div class="TableCSS"> <table> <thead> <tr>…
-
1
votes1
answer24
viewsQ: Validate class that executes an sql query
Hello, I have the following code in my dao.php. public function insert(){ $this->conn->beginTransaction(); try { $sql = "QUERY DO INSERT AQUI ......."; $stmt = $this->conn->prepare($sql,…
-
1
votes2
answers1173
viewsQ: Color chartjs numbers
I made a code in js and php but I can’t find where you are setting the color of the numbers that show the values on the dots of the graph lines. I need to know at what point you have the red color…
-
0
votes1
answer1598
viewsQ: Add values from a php string
I have the following code: foreach ($class->ListaChave($CdLote) as $dados) { var_dump($dados->getQvol()); } Exit: string(1) "1" string(1) "1" string(1) "2" string(1) "1" I need these values to…
-
0
votes4
answers183
viewsQ: Pdostatement::rowCount returns -1
I need to know how many records were entered in the query below. public function CadastraCliente() { $this->conn->beginTransaction(); try { $stmt = $this->conn->prepare(" INSERT INTO…
-
1
votes1
answer183
viewsA: Query SQL error in PHP
I decided to add the SET ARITHABORT ON in front of my SELECT. Thus remaining: public function teste($nrchave) { $sql = " SET ARITHABORT ON SELECT CAST(REPLACE(CAST(DsXML as Nvarchar(Max)),'…
-
0
votes1
answer183
viewsQ: Query SQL error in PHP
I came across an sql error, but when running the query in SQL Server Studio returns me the normal query. Query that is below. SELECT CAST(REPLACE(CAST(DsXML as Nvarchar(Max)),'…
-
0
votes1
answer48
viewsQ: SQL in php script
SELECT CAST(REPLACE(CAST(DsXML as Nvarchar(Max)),' xmlns="http://www.portalfiscal.inf.br/nfe"','') as xml).value('(/nfeProc/NFe/infNFe/transp/vol/qVol/node())[1]', 'int') as [qVol] FROM SPDNFE WHERE…
-
3
votes4
answers1722
viewsQ: How to recover a value from within a tag in XML?
I have a table called SPDNFE with a column DsXML which contains all the contents of a Xml. Query: SELECT top 1 SPDNFE.DsXML FROM SPDNFE where SPDNFE.CdIdNFe =…
-
3
votes1
answer172
viewsQ: Query SQL Server Error
I have the following SQL: INSERT INTO SISCli…
sql-serverasked KevinF 1,332 -
0
votes2
answers6190
viewsQ: Passing parameter via href php
I’m passing a parameter via href, but wanted to hide the parameter in the URL. I’m sent like this: echo '<a href="edita.php?id=' . $objCont->getid() . '">'; I get it like this in the URL:…
-
0
votes1
answer1441
viewsQ: Hide domain directory using htaccess
I need to hide the directory of url. How does it look: www.meusite.com.br/Site/view/telaInicial.php How I need: www.meusite.com.br/telaInicial.php Man .htaccess currently: RewriteEngine On…
-
1
votes1
answer619
viewsQ: Select that does not return SQL blank
select 'TEM' AS InSituacao from GTCLogist where NrPlacaCarreta = '' and ID <> '35514' and year(DtBase)=year(GETDATE()) and MONTH(DtBase)=MONTH(GETDATE()) and DAY(DtBase)=DAY(GETDATE()) I have…
-
0
votes1
answer211
viewsQ: Join repeated information in a PHP table row
I need to join in a table row when the addresses repeat bringing only one address of the three I have, follow code below: <table class="tableModif"> <thead> <tr>…
-
2
votes2
answers1084
viewsQ: Maximum limit Google Maps bookmarks
I have the application below, which adds markers on the map according to the past addresses, but it seems to me that you have a maximum limit. It only scores 10 points, but there are more than 10…
-
1
votes2
answers284
viewsA: Php data and tags google maps
I ended up getting it this way. I don’t know if it’s the best but it’s functional. <script> $(function () { initMap('Av. Paulista, 500, São Paulo, SP', 'map'); <?php foreach…
-
0
votes2
answers284
viewsQ: Php data and tags google maps
I own a foreach taking some data from the bank, among them the address. foreach ($roteiro->ListaRoteiro($romaneio) as $dados) { echo $dados->getRomaneio() . " - "; echo $dados->getPlaca() .…
-
3
votes2
answers29
viewsQ: validation filter_input php
I’m getting paid for $_POST I would like to know whether it is wrong to validate the if thus. $romaneio = filter_input(INPUT_POST, 'romaneio'); if($romaneio == ''){ $romaneio = 'null'; }…
-
1
votes1
answer127
viewsQ: Store amount of values in a PHP txt
I have the information below in a file txt. 500038;204932;61312;FTE GAV EDIT LACAVA TOTAL LARGXALTX15 GAV. NORMAL;LACA BLU FOSCO#996#335;5;78101922;xxxxxxx;0204932005 500038;204932;61312;FTE GAV…
-
3
votes3
answers130
viewsQ: Store PHP array value and quantity
I need to sweep the first array and store the value and quantity of that value in another array. I’m not succeeding because I’m having trouble storing the values in another array. Array: array(5) {…
-
1
votes1
answer936
viewsQ: Total amount of values in PHP array
I have this array below, and I would like to know how I can count how many equal values have in the value[0]. Array: array(5) { [0]=> array(9) { [0]=> string(6) "500038" [1]=> string(6)…
-
1
votes1
answer1751
viewsQ: Delete last line in white txt php
I have a txt file and need to delete the last line, but it is empty. I tried the code below and it just erases the top line of the last one that would be blank. Follows code: $lines =…
-
2
votes2
answers2019
viewsQ: Write to txt file with PHP
I have a file txt but is missing the nome in several lines of the file, I would like to put the name according to the order number. The logic would be to check the order number of the line that is…
-
0
votes1
answer427
viewsA: Set image height and width
There is a class ready called wideimage you find it here: http://wideimage.sourceforge.net/ Example of use: // Chama o arquivo com a classe WideImage require('/caminho/WideImage.inc.php'); //…
-
0
votes1
answer85
viewsA: Validation php Pdo function
I decided to stay like this, I don’t know if it’s the best way. $stmt = $this->conn->prepare(' IF NOT EXISTS ( SELECT 1 FROM ESP35302_TMP WHERE ESP35302_TMP.CdInscricao = ' .…
-
0
votes1
answer85
viewsQ: Validation php Pdo function
I have the function below that makes an Insert in table ESP35302_TMP but before inserting I need to do a validation in this table, if there is already the number of barcode I am inserting, if there…
-
0
votes0
answers21
viewsQ: Schedule task via windows in a php file
Code: foreach (glob('ImgCode/*.png') as $Files) { unlink($Files); } Problem: I need to run this code to delete photos from folder, every day at 00:00 hours. I would like to know what possibilities…
-
2
votes1
answer1697
viewsQ: PHP calculates distance between cities
With the code below I can calculate the distance from one city to another, but I can only put cep’s would have some way to use the city’s own names instead of cep’s ? $i = 0; $arr =…
-
4
votes2
answers382
viewsQ: Format value with explode and implode PHP
I have a dhEmi tag that has this value 2016-09-09T08:10:52-03:00 To return me a datetime I did the following. $dtemis = $item->infNFe->ide->dhEmi; $res = explode("T", $dtemis); $res1 =…
-
2
votes1
answer314
viewsQ: Move multiple . xml files to another PHP directory
Current directory Xmls/multiple files here.... I want to pass all files from inside Xmls to Xmls/Xmlslidos I tried to do with copy and then use unlink, but it didn’t work out.…
-
0
votes1
answer925
viewsQ: Send hidden parameters to another page without showing them in the URL
After doing a search on a form method POST. <form method="POST" action="../controller/precontBuscaProg.php"> <input type="date" name="dataini"> </form> I receive on another page…
-
0
votes1
answer196
viewsQ: PHP Dynamic Function
How do I rework this function to make a select in more than one table, dynamically ? public function Lista(){ $results = array(); $stmt = $this->conn->prepare("SELECT * FROM 'tabela'");…
-
0
votes1
answer82
viewsQ: Dynamic php css
Well, I have a map in SVG and I need to color some cities, but I need to do it dynamically because there are a thousand cities. It will be about 4 colors and each group with such cities will be of…
-
1
votes1
answer460
viewsQ: Upload file . txt removing php accents
I need somehow to upload a file. txt and all the text is stored in a array and then run this array and remove all accents from the text, after that generate the file . txt without the accents ?…
-
0
votes0
answers421
viewsQ: Poligonos Google Maps
I am using the google API but need a way to make the polygons of "such" automatic state without having to do it manually. 'Cause it’s several states I’ll need to bypass, there’s some way to do this…