Posts by Márcio Amaral da Fonseca • 186 points
16 posts
-
0
votes3
answers49
viewsA: Validate form and send email
You can give an id to your form and then do Submit by jQuery $('#id'). Ubmit();
-
2
votes3
answers40
viewsA: Printing only the last result
Boas, you must concatenate the $html variable in each iteration: $html = ' <html> <head> </head> <body> <table class="flat-table"> <tr> <th>Nosso…
-
0
votes3
answers428
viewsA: Fullcalendar remember every month
There are several ways to do it, I’ll just give you some initial hints for an implementation idea (may not be the most correct/efficient): Instead of repeating the events in the comic book, that is,…
-
0
votes2
answers351
viewsA: Magento 1.9 API
SOAP API According to the documentation can load WSDL into SOAP client through the links: "/api/? wsdl" ; "/Soap/? wsdl"; and from the version "/api/v2_soap? wsdl=1" if you want to use ML-RPC the…
-
1
votes1
answer34
viewsA: Make cumulative value in loop
var previsto = []; for(var i = 0; i < $(".previsto").length ; i++) { if(i == 0) previsto[i] = $(".previsto").eq(i).text(); else previsto[i] = previsto[i-1] + $(".previsto").eq(i).text(); } To sum…
-
1
votes2
answers476
viewsA: Read csv file that has header and column with commas
If your csv field contains commas the same must have an Enclosure character Example of a comma line where Enclosure is the character " Jim Grayson, Senior Manager,(555)761-2385,"Spoke Tuesday, he’s…
-
0
votes1
answer22
viewsA: parse error no for each
Try to verify the existence of all variables and their type if(isset($_GET["cimc"]) && is_array($_GET["cimc"])){ foreach ($_GET["cimc"] as $form) { if(isset($_GET['peso']) &&…
phpanswered Márcio Amaral da Fonseca 186 -
0
votes2
answers60
viewsA: Connection to database on Amazon
If the DBMS is Microsoft SQL Server it is not possible to use the functions of the Enhanced Mysql Extension (mysqli). I recommend using PHP Data Objects (PDO) link to the documentation can access…
-
0
votes1
answer91
viewsA: Login with multiple users
Well its implementation is not correct: The login management should be done on the server side, ie in php. It is wrong to store login values in js, they are exposed to any user (js code is visible).…
-
1
votes1
answer125
viewsA: Return a Javascript variable and the contents of PHP - AJAX
Good, there are n solutions. See an example (needs jQuery): html file: <a href="#" id="lin">voltar</a> <br> <div id="divcont"></div> <br><br> <button…
-
1
votes2
answers131
viewsA: Merge php arrays
You can use the array_merge( array $array1 [, array $... ] ) Follow an example: <?php $a= array(); $a['xpto'] = 'aa'; $b= array(); $b['xyzz'] = 'bb'; $c = array_merge($a, $b); print_r($c); ?>…
-
2
votes1
answer197
viewsA: How to make Reload page take 10 seconds
In doing window.location = window.location.href; The page will reload soon, stopping running the setInterval; To fix just change the function by: function autoRefreshPage() { setInterval(function ()…
-
1
votes4
answers2255
viewsA: Changing CSS by class in Javascript, is it possible?
Example: By Javascript "native": var m = document.getElementsByTagName("div"); c = m.style; c.color = "#c00"; c.backgroundColor = "#eee"; c.width = "200px"; c.height = "100px"; c.borderColor =…
-
1
votes2
answers81
viewsA: Table populated by other tables
To insert data from one or several columns in a new table we can use a INSERT INTO combined with a SELECT or syntax CREATE TABLE ... SELECT Examples: INSERT INTO tabela_a (coluna1, coluna2) SELECT…
-
0
votes1
answer201
viewsA: How do I add a Google login option to my website?
Good see the following php libraries: https://github.com/google/google-auth-library-php( Google’s Officially supported PHP client library for using Oauth 2.0 Authorization and Authentication with…
-
1
votes2
answers5935
viewsA: Is there any clause similar to LIMIT in PL/SQL
In mysql: SELECT * FROM tabelaxpto LIMIT 1 In sql: SELECT TOP 1* FROM tabelaxpto In pl sql: SELECT * FROM tabelaxpto WHERE rownum = 1…