Posts by Larissa silva • 333 points
21 posts
-
0
votes1
answer89
viewsQ: Error 500 in php code with linux
I have the following connection to the bank: $pdo = new PDO('mysql:host=localhost;dbname=teste;charset=utf8', 'root', ''); In windows it works perfectly when I started the project on linux from…
-
1
votes2
answers654
viewsA: Pick up an array index in PHP with foreach
Try it like this: foreach($userinfo as $item) { echo $item['valor_cobrar']; }
phpanswered Larissa silva 333 -
2
votes1
answer83
viewsA: return message to user
Initially your index should be . php to be able to make the change I will give as an example. In index you put an if to check if there is a Session if it exists it shows a div otherwise shows the…
phpanswered Larissa silva 333 -
0
votes3
answers52
viewsA: Running the POST before onclick
You can do with js for when the user finishes typing the password he already do this validation. In the example below I have a display message for the user if the passwords are different, and also a…
-
0
votes1
answer89
viewsA: Take data from a table through an N:N relation
So when the student logs in, you’ll pick up in this table N:N student teacher where his id appears, and the respective teacher ids, with that you’ve already picked up his friend list, so you’ll…
-
0
votes1
answer39
viewsA: Notice: Undefined variable: list_book
This variable $list_livro only exists in the file processa_livro.php. A possible solution would be to put the query in the file that shows the table. As for example: <?php…
-
3
votes2
answers203
viewsA: How to remove button with one click using jQuery
Follow an example below, there is the button called example when clicked on it, the same goes. jQuery(document).ready(function($) { $('#btn_teste').click(function() { this.remove(); }); });…
-
0
votes1
answer107
viewsA: How to use a single form to register a new user and change data of an existing user on the system?
a possible solution would be, when you click a tr, send by url some data, can be the id, code, what you think best, and when you add new, you do not send anything. example: <button…
-
1
votes1
answer55
viewsA: Implement code ajax already ready
To pass this to ajax you will need the following changes: HTML: I only put id in the fields <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog"…
-
1
votes3
answers891
viewsA: How to validate form fields using pure Javascript
To do this validation with jQuery I do it like this: In HTML I create a tag with the error message, put None display by the same jquery and valid when submitting the form, in a variable I put value…
javascriptanswered Larissa silva 333 -
1
votes1
answer44
viewsA: Calculate, Javascrips, Jquery
If your project is bringing the decimal number with a comma instead of a dot, it goes from the error when calculating. A possible solution would be you replace the comma by dot and if it is coming…
-
0
votes2
answers236
viewsA: Handle data received by AJAX
You can do as follows if you want to validate what is coming from ajax you can put what came from ajax in a variable as in the return example and make an if checking if it is what you want, if it is…
-
0
votes2
answers188
viewsA: Message with a confirmation question before completing the click event
Hi, take a look at the link: https://sweetalert2.github.io/ It is a custom type for js POP-UP boxes, it already comes all customized with various types of messages.…
-
0
votes2
answers116
viewsA: Select options does not work using jquery
To get the value of select with jQuery just do the following: HTML <label>Quantos módulos fiscais a sua propriedada tem:</label> <select id="fiscalModule"> <option…
-
0
votes2
answers1495
viewsQ: Take the values of all select options with jQuery
I have this <select> which is generated dynamically <select id="select_exemplo"> <option id="exemplo"> <option id="exemplo" value="10">teste 1 </option> <option…
-
0
votes1
answer100
viewsQ: Popular checkbox with jQuery
I need to popular the input with data coming from jQuery. I got the following input: <label> <input type="checkbox" id="turmas"/> </label> In the jQuery I have the following code:…
-
1
votes1
answer38
viewsQ: Repeat query there is database using for in PHP
I have the following appointment $turmas= $wpdb->get_results( $wpdb->prepare( "SELECT nome FROM turmas WHERE id= '%d' ", $_POST['idSerie']), ARRAY_A ); When I get $_POST['idSerie'] with an…
-
0
votes1
answer254
viewsQ: Capture the value of a table cell and save to a variable via jQuery
I have the following table <table class="table"> <tbody> <tr> <td scope="row">teste</td> <td id="teste" name="teste" class="teste">1</td> </tr>…
-
1
votes1
answer3164
viewsQ: ERROR Uncaught Syntaxerror: Unexpected token < in JSON at position 0
I have the following JS script: jQuery(document).ready(function($) { $("#idSelect").change(function(event) { var valor = $(this).val(); //alert(valor); $.post( "ajaxSerie.php", { valorInput: valor…
-
1
votes0
answers55
viewsQ: Hide Google user profile photo from the site when you have logged in
Good afternoon, I’m making a website for a client, it has interaction with the Google Maps Plataform api, when the user is logged in to your google account keeps showing his photo on the maps, my…
-
0
votes0
answers45
viewsQ: convert pixel to cm openGL
I need to change an object to where the mouse is clicked, I’m trying to do with a point to start. I already managed to capture the mouse position but it comes in pixel and I need this value in…