Posts by HENRIQUE LOBO • 468 points
24 posts
-
1
votes2
answers700
viewsA: Taking URL Variables from One Page, and using another
It would be ideal to make a single PHP script. You can pass an input with the id of the selected payment method to the PHP script, and then use a switch statement. Example. switch…
-
1
votes1
answer283
viewsA: Fullcalendar does not display the event according to schedule
Example of how to mount the array to then return to JSON literal Object: foreach ($aAgenda as $k => $v) { $dados[] = array('id' => $v->id, 'title' => $v->title, 'start' =>…
-
-1
votes2
answers128
viewsA: URL form sending nomenclature
In Standard Resource Finder (URL, Uniform Resource Locator), an internet address the percent encoding is used to prevent misinterpretation of special characters such as spaces, parentheses and other…
urlanswered HENRIQUE LOBO 468 -
0
votes1
answer83
viewsA: Add event to a Directive element
An example of the click event in this case will remove the 'LIST' item by clicking; <input type="checkbox" ng-click="list.splice($index, 1)" id="{{item + $index}}" value="{{item.name}}">…
-
2
votes1
answer301
viewsA: Error while deleting with PHP using PDO class and object orientation
You are right to call the object connection to the database ? $delUsu = $this->con->Connect()->prepare($delUsu); Removes these lines from their function is not used for DELETE fetch method…
-
1
votes1
answer670
viewsA: Error in __toString PHP7 function
The Error Fatal error: Method Usuario::__toString() must not throw an Exception, Caught Error: Call to a Member Function format() on null in It’s happening precisely because…
phpanswered HENRIQUE LOBO 468 -
0
votes1
answer161
viewsA: I calculate in foreach php with jquery
In this case you have to use Javascript if you use Jquery: Call the function when typing, the class you put in the quantity field: $( ".class_qtd" ).blur(function() { SomaTotalProduto(); }); To work…
-
1
votes3
answers651
viewsA: sessionStorage with expiry time
<script> (function () { var minuto = 0; setInterval(function () { if (minuto == 30) { aviso(); minuto = 0; } else { minuto += 10; } }, 600000);//10 minutos var aviso = function () { if…
-
0
votes2
answers174
viewsA: How to link to each banner in @keyframes
You can do something like this: <a href="seu_link1"><div style="background-image: url('img1');"></a> <a href="seu_link2"><div style="background-image:…
cssanswered HENRIQUE LOBO 468 -
-1
votes3
answers1432
viewsA: Print element from a specified position in the list
def how_many_days(month_number): """Returns the number of days in a month. WARNING: This function doesn't account for leap years! """ days_in_month = [31,28,31,30,31,30,31,31,30,31,30,31] return…
-
0
votes3
answers43
viewsA: Prohibit lines from being exactly the same in the database
PK uniquely identifies each record in a database table, UNIQUE recommended for what you need. and you have to make error treatment in your application when the records are identical. ERROR 1062:…
-
0
votes2
answers288
viewsA: Sum the total value of a given column for each table - Mysql
You can do so, put before the FROM. (SELECT SUM(valor_receita) FROM tabela_receitas) AS total_receita, (SELECT SUM(valor_despesa) FROM tabela_despesas) AS total_despesa
-
0
votes4
answers721
viewsA: foreach php inside <script>
Look at this example: return json_encode($arr); The printed array {"a":1,"b":2,"c":3,"d":4,"e":5}. $.ajax({ type: "get", url: "sua_url.php", dataType: "json", success: function(json){ $.each(json,…
-
1
votes4
answers810
viewsA: Validate Javascript fields
You can put a class in all input and in jquery check if it is empty, leave the button disabled, if you pass the validation you enable the button. $('.campo').each(function() { if ($(this).val() != 0…
-
12
votes8
answers5012
viewsA: Printing a String until a space is found
Yeah, just use that example: // aqui é o campo caminho que vai retornar da consulta. $caminho ="Faturamento Cupom"; echo "Caminho a ser quebrado<br>".$caminho; $string = explode(' ',…
-
2
votes2
answers939
viewsA: Query returns empty using PHP with PDO and MS Sqlserver
Missing meta-characters '%', '%' Matches any number of characters, even zero character $busca = new Busca; $busca->setTermo('%identidade%'); $resultado = new…
-
-2
votes2
answers176
viewsA: Doubt with foreach
I just printed, but then you can do the processing as you need the data return, whether it is in array form or just printing. <?php public function getAll() { //array $d =…
phpanswered HENRIQUE LOBO 468 -
-2
votes2
answers176
viewsA: Doubt with foreach
You can do so, the $d variable you will use the array you created. Example, this way will work. <?php //array $d = $arrayName = array('A' => 1,'B'=>2 ); foreach ($d as $key => $value) {…
phpanswered HENRIQUE LOBO 468 -
3
votes1
answer472
viewsA: PHP Mail function does not work
I use this way, and transforming into Base64 the email. $para="[email protected]"; $assunto ="assunto Teste"; $html="Olá esse é o conteudo do email"; $headers = "From: Email do…
-
2
votes4
answers147
viewsA: Is there any way to decrease this script without losing functionality?
To reduce a little can be done like this. $("div#contenthead div.left span.atendimento").hover(function() { $("div#contenthead div.topmenu ul.atendimento").addClass("displayblock");…
-
2
votes4
answers721
viewsA: foreach php inside <script>
It is easier to use the function json_encode PHP. Then, in Javascript, just do the processing array converted to JSON. Example: $arr = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e'…
-
-1
votes2
answers1913
viewsA: Query to pick text after a certain character
After you do the query you can do this treatment, before returning the query result to the grid or other element you are using, just grab the code and play inside a PHP file and take the test. //…
-
2
votes6
answers1359
viewsA: How to insert an if/Else into an echo?
It can be done that way. <?php $value='United States'; $selected = ($value)=='United States'?'selected':''; echo "<select>"; echo "<option>Teste</option>"; echo '<option…
phpanswered HENRIQUE LOBO 468 -
0
votes2
answers1373
viewsA: Menu does not fade when clicked on responsive bootstrap site
Just add this javascript on the page that by clicking on the menu it will close $(document).ready(function () { $(".navbar-nav li a").click(function(event) { $(".navbar-collapse").collapse('hide');…