Posts by Bruno Rigolon • 3,282 points
130 posts
-
5
votes1
answer291
viewsA: PDO shows no errors
To display or hide errors, the parameters must be passed to PHP, so if there is an error in the PDO lib, they will be displayed. Place this code at the beginning of the file that should be able to…
-
0
votes3
answers2844
viewsA: Perform a function while holding button, stop when release
I believe the necessary actions are below, missing is to implement the code of your recording, see if it helps you: $(function() { $("button").mouseup(function() { $("#gravando").text('Não'); // Sua…
-
1
votes1
answer1704
viewsA: How to get the current Browser URL with PHP?
Use the $_SERVER['HTTP_REFERER'] attribute, it will reference the request source link.
-
2
votes2
answers1403
viewsA: Pick value after point
Another option would be to use the round. $valor = "235.33333333333333"; echo round($valor, 2); #235.33
phpanswered Bruno Rigolon 3,282 -
5
votes3
answers4799
viewsA: How to remove clasps in a regex?
I just added at the beginning [ and ]. Stayed like this: replace(/[\[\].!'@,><|://\\;&*()_+=]/g, "")
-
2
votes2
answers228
viewsA: How to make a slider hour range with jquery?
If you want to take the initial time and the final time in minutes, do not use the conversion, it would be the following code: $(function() { $("#hora-range").slider({ range: true, min: 0, max:…
-
-2
votes2
answers83
viewsA: Replace HTML tags
Well, I don’t know if I understand it very well, but since Alert you would have the console.(). Instead of Alert('Hello world'), you would put console.log('Hello world'). In the case of Chrome,…
phpanswered Bruno Rigolon 3,282 -
1
votes3
answers3321
viewsA: How to overwrite some bootstrap attributes?
In this link in Stackoverflow in English you have the list of all media queries used. The question they asked was which Bootstrap 3 breakpoints and user listed all with comments. Grab the code that…
cssanswered Bruno Rigolon 3,282 -
1
votes1
answer371
viewsA: Table Filters with jQuery
If I understand what you need correctly, I think I can handle it. I added the counter right at the beginning to have access to the scope, then we reset it so that it does not take trace of other…
-
1
votes2
answers287
viewsA: How to write data without Jquery mask using Cakephp3
The way to make mask via PHP, take the clean number, example 12345678910 and turn it into 123.456.789-10 would be with the code below: $cpf = "12345675910"; echo $cpfMask = substr($cpf, 0, 3) . "."…
-
3
votes1
answer690
viewsA: PHP does not run Onclick Return confirm
In the part where you are onClick, see that right after the word confirm you have another ' (single quote), as it was used as the onClick action opening, you are closing it there. Place a (") double…
-
0
votes2
answers226
viewsA: INNER JOIN Mysql error and JSON view
Try this code, I made a change, added the $lines variable and fetchall. <?php //Produtos $row=$db->prepare("SELECT empresa.username, empresa.projeto, compras.username, compras.projeto,…
-
1
votes1
answer949
viewsA: How to create a table with HTML and CSS?
The HTML code to create this table would be as follows: <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/> <table…
-
0
votes2
answers226
viewsA: INNER JOIN Mysql error and JSON view
Hello, put before json_encode the following code: header('Content-Type: application/json'); This serves for the answer to be in json format, without this, your answer is considered a web page. Note:…
-
0
votes1
answer426
viewsA: Change url via . HTACCES
Hello, it’s simple, just put www being optional on condition. Example: RewriteEngine on RewriteCond %{HTTP_HOST} ^(www\.)?dominio.com.br$ RewriteCond %{REQUEST_URI} !webstore/ RewriteRule (.*)…
-
3
votes3
answers367
viewsA: MYSQL relationship between tables
Item p.* means to display all fields in the product table. Right after FROM, has written products as p, this is a short name so you don’t need to write products.. How was created the nickname p, you…
mysqlanswered Bruno Rigolon 3,282 -
1
votes2
answers287
viewsA: How to write data without Jquery mask using Cakephp3
You can remove what you don’t want in the backend. Where you restore data, clear the variable before it is saved. Example: <?php // Remove qualquer caracter diferente de número // Antes…
-
0
votes2
answers280
viewsA: How to block directory files recursively?
Hello, add in the folder you want to lock the files the following code below in .htaccess. Note: This lock is recursive. Order deny,allow deny from all # Allow access to html files <Files ~…
-
4
votes2
answers8910
viewsA: Populating selects of cities and states with AJAX (PHP and jQuery Mobile)
I made an example not to depend on programming, only javascript. The file with the cities and states are in https://api.myjson.com/bins/enzld. A query will be made in this file and then populated…
-
0
votes1
answer723
viewsA: How to adjust span next to Labels?
By putting a minimum space in the titles you can make the alignment, an example would be to add this css: .outputs ul li span.spans { display: inline-block; min-width: 200px; text-align: right; }…
-
0
votes2
answers81
viewsA: Are there "problems" using jQuery’s small?
Can use without fear. This will not influence the performance, there is only an initial overload on the first load, where the file Javascript of jQuery that will be loaded. After this, the file will…
-
0
votes3
answers2558
viewsA: How to align a text in the middle of the height of an image?
Just apply to the vertical-align image: Middle. By default, the images are positioned at the bottom of the line. See this example as simple: Html: <div> <img class="middle"…
-
4
votes2
answers693
viewsA: Tooltip Bootstrap 3 disappear when I click another
You must close all other tooltips and open only what you clicked. With this html: <a class="btn" rel='popover' data-placement='bottom' data-original-title='Teste 1'…
-
3
votes2
answers60
viewsA: How to sort object vectors by checking an attribute?
Another suggestion is to use lib lodash. It has several javascript functions that make the job "hard". For example, performing this ordering operation would be so simple: var listDistances = […
javascriptanswered Bruno Rigolon 3,282 -
2
votes2
answers214
viewsA: How to store record in new column within wp_users table? (Wordpress)
As Ricardo quoted it, do not change the WP tables, in the future this could be a big problem. Use the above function, update_user_meta. Below is a complete example of how to add the field on the…
-
3
votes4
answers2076
viewsA: How to check if IP exists with bat
It is not the solution to your problem, but it can help you. There is a program called Nmap, it serves to scan the network and several other functions related to ips scanning... Follow the website…
batchanswered Bruno Rigolon 3,282 -
1
votes3
answers640
viewsA: How to use anchor in vuejs/Vue-Loader?
I believe you are using vueRouter, if yes, you need to change the way the scrollBehavior function behaves. The example below demonstrates how to navigate to the element on the page instead of…
-
5
votes2
answers824
viewsA: Customize error messages on database connection
I recommend using PDO, since it is starting this will make your life much easier. It supports more than 10 types of database. An example connection with verification support is below: <?php try {…
-
0
votes3
answers215
viewsA: Project Improvement in PHP
separate logic from view. Deliver the object of the query, such as an array of items, in the (HTML) view make a simple while. So you are not obliged to use only Bootstrap and can enjoy in another…
-
2
votes3
answers4074
viewsA: Show/Hide animated information by clicking on the widget
I recommend using jQuery, it makes understanding easier and you write less and do more. I made a quick and simple code based on what you gave me: HTML <div class='conteudo-oculto'>…