Posts by Maycon Benito • 90 points
10 posts
-
2
votes2
answers122
viewsQ: I cannot filter array objects using Filter
I am trying to return the objects according to the generos id but an empty array is being returned var filmes = [ { title: 'Primeiro Filme', genres: [ { id: 10 }, { id: 15 }, { id: 21 } ] }, {…
-
-2
votes1
answer54
viewsQ: PHP returning json as string
I’m returning this one JSON using PHP but the object genre and cast is being returned as string { "id":"5", "title":"A Era do Gelo", "year":"2002", "age":"0", "time":"81", "genre":"[{\"id\": 16,…
-
0
votes1
answer257
viewsA: PDO 'Call to a Member Function prepare() on array'
Change that line: $stmt->bindParam( ':tamanho', $site ); for that: $stmt->bindParam( ':tamanho', $tamanho);
-
1
votes2
answers1019
viewsQ: Is it possible to change the name of a JSON position using Javascript or jQuery?
I have this JSON: [{ id: 1, total: 50.00 }, { id: 2, total: 70.00 }] I wonder if it is possible to change the name from 'total' to 'price' using Javascript or jQuery?…
-
0
votes3
answers2290
viewsA: Use database data in a select option (HTML/PHP)
Select from the table and use a foreach to display the names in select <select> <?php foreach($select as $valor){ ?> <option value="<?php echo $valor['nome']?>"><?php echo…
-
0
votes1
answer1857
viewsQ: Create JSON with javascript
I wanted to know how to create a json by taking data from another json using a for var imdb = { "title": "Justice League", "content_rating": "PG-13", "original_title": "", "metadata": { "languages":…
-
0
votes1
answer30
viewsA: Access PHP class with AJAX
$.ajax({ type : 'post', url : '../folder2/controller/classX.php', dataType : 'html', data : { var1 : 12, varId : 87 }, beforeSend : function() { }, …
-
0
votes1
answer45
viewsA: PHP $_POST is not being created when you submit the form
Try it this way $('.formSubmitCheckout').click(function() { var t=$(this); var isItemCheckout = t.hasClass('itemCheckout'); var form = $('form'); if(!isItemCheckout) {console.log('testOk');…
-
1
votes4
answers410
viewsA: JS countdown - How to insert a "zero" in front of numbers smaller than 9?
Makes a if by checking if the number is less than 9 if (numero <= 9){ var numero = '0' + numero }
-
-1
votes2
answers26
viewsQ: How do I get the field values?
My code $(document).ready(function(){ $('.formulario').submit(function(e){ e.preventDefault(); var inputId = $('.inputId').val(); $.ajax({ method: "GET"…