Posts by Wilson - • 409 points
8 posts
-
0
votes2
answers433
viewsA: How to put a default php option Selected
Here is the solution. If the year is 2012 the option is Selected. Now have to ensure that the year is 2012 only once. $ano[] = "<option ".($row[ano]=='2012'?'selected':'')."…
-
2
votes4
answers2128
viewsA: How to create a custom context menu?
$(document).mousedown(function(event) { switch (event.which) { case 1: alert('Tecla Esquerda'); break; case 2: alert('Tecla do Meio'); break; case 3: alert('Tecla Direita'); break; default:…
-
4
votes2
answers606
viewsA: Jquery Check Value
Good morning Thepeter, What the code I am entering will do is, in all Hidden inputs find the value of the inputs and compare with the closed value (compare_value variable). I think this is what you…
-
3
votes3
answers218
viewsA: What makes the expression "'2 pigs' + '3 horses' == '5 animals'" return true in PHP?
var_dump(5 == '5 animais'); // bool(true) E mais questionável ainda: var_dump(5 == '00005 animais'); // bool(true); Why would this return false? This has to do with the PHP mechanisms it "searches"…
-
13
votes3
answers49921
viewsA: Convert string number to PHP integer
If you are returning 1 through the intval may be the fact that the variable is an array. Note this. Make sure the variable is a string. Example: $variavel = '200'; $variavel = intval($variavel);…
-
2
votes3
answers524
viewsA: Count without using rowCount from PDO
Pdostatement::rowCount() Returns the number of Rows affected by the last DELETE, INSERT, or UPDATE statement executed by the corresponding Pdostatement Object. If the last SQL statement executed by…
-
1
votes1
answer3467
viewsA: Save php array to mysql database
I usually use serialize. But attention, will the array be giant? If it is giant I advise you to change the maximum size of the variable in SQL to longtext instead of text/varchar etc... Otherwise…
-
3
votes2
answers449
viewsA: Putting Forward and Return Control on Slide Show
Good afternoon, Here I leave a much simpler solution. Javascript/jQuery: jQuery(document).ready(function(){ $(function(){ $('#slideshow h4:gt(0)').hide(); setInterval(function(){ $('#slideshow…