Posts by ElvisP • 1,523 points
168 posts
-
2
votes3
answers75
viewsA: How to add dropdown to menu
The menu below was extracted from the site W3school, and you can access it here. .dropbtn { background-color: #4CAF50; color: white; padding: 16px; font-size: 16px; border: none; cursor: pointer; }…
-
2
votes2
answers843
viewsQ: Get specific XML tag with PHP
I get an XML file for a hosting directory and the file has the following structure: <categorias> <id_53>142</id_53> <id_89>346</id_89> <id_160>457</id_160>…
-
0
votes0
answers425
viewsQ: #1253 - COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'utf8mb4'
Why if there is an INNER JOIN the QUERY returns the error #1253, but without INNER JOIN the QUERY returns the records correctly, both are ? The query is simple, so it works: SELECT a.* FROM…
-
-2
votes1
answer31
viewsQ: Subtract -1 from the mysql field’s own value
In a table field of the integer type stores the quantity of items in stock, when I lower, I must give -1 of the field itself, how to do this straight from mysql? Is that correct? UPDATE `tblQtd` SET…
-
-1
votes1
answer110
viewsA: I found this in my error logs, a hack attempt?
As it is not possible to post this in the comment, it follows a list of htaccess that may add something to your service. ##### Block directory browsing -- END…
-
0
votes1
answer163
views -
-1
votes2
answers158
views -
0
votes1
answer163
views -
0
votes0
answers17
viewsQ: Menu accompanies content on screen scrolling
In OLX has a menu on the left side that after certain scrolling the same accompanies the content: https://pr.olx.com.br/roupas-e-calcados/calcas?cond=1 The current HTML developed with…
-
1
votes1
answer227
viewsQ: Bootstrap class . text-Justify 3 doesn’t line up without any previous inheritance
I inserted a class in a div to justify the internal text but does not respect, and there are no inheritances of classes or higher level elements. <div class='col-xs-12 col-sm-12 col-md-8…
-
1
votes1
answer25
viewsQ: Does Bootstrap 3 feature exist?
Is there this feature in Bootstrap 3? I did not find and I find so frequent the use in websites.…
-
-2
votes2
answers96
viewsQ: Increment function in another jQuery function
The code below helps the user to find terms and highlight them(hightlights) within any HTML element, is functional but the code does not highlight words when typed without accentuation, if highlight…
-
1
votes1
answer42
viewsQ: Child element count returns 'Undefined' in jQuery
I am trying to count child elements of a parent element with jQuery in the HTML I created, but it is returning the value 'Undefined'. <div class='dataGrid'> <div…
-
3
votes1
answer40
viewsQ: In SEO using more than one link in HTML to another page is bad?
It’s bad SEO practice to use more than one tag a in an HTML structure to another HTML page href the same link? Ex: <div> <div> <a href='link1.html'><img src='path/img.jpg'/>…
-
1
votes2
answers69
viewsQ: Fix last element of the list unordered in footer
The HTML displays a menu with minimum height, is it possible to keep the last item aligned in the footer of the menu in a fixed mode? I put 5 items before "all" but it is possible that there is less…
-
-1
votes1
answer149
viewsQ: Expired date alias in Mysql
I have a query select which receives the user date in the database MySQL and the shape of the field is datetime, and the PHP treats the output and in HTML data as the date of registration of a…
-
-1
votes1
answer118
viewsQ: Form in HTML+PHP+Jquery to edit password appears Chrome default window
I made a form for password editing and the expected action is a Ubmit on onclick, but on the contrary is displayed a screen for managing Chrome, I did not enable this option and it persists on all…
-
1
votes2
answers184
viewsQ: Change background and color input password in bootstrap 3
I customized all the website input fields by passing new values to the Bootstrap 3 classes by changing the input[type='password'] Bootstrap 3 style sheet (loose sheet after loading of BS3 css), the…
-
0
votes1
answer124
viewsQ: Get URL from the page that called the file with jQuery . load()
I have a PHP function: if( !function_exists('site_url_full') ) { function site_url_full() { $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT']…
-
1
votes1
answer85
viewsQ: Variable sanitization X variable filter before insertion in MYSQL
I took a project to make some adjustments and noticed that there were some security loopholes in the database entries, I could not make changes to the querys but I could make adaptations, made the…
-
1
votes1
answer461
viewsQ: Comment on Mysql table
You can insert a comment in the table equal to the comment in a table field? I need to enter information up to 160 characters in the database tables to help the other devs to have a brief summary of…
-
0
votes0
answers27
viewsQ: include file, file not found
When making use of include() or include_once(), and by some misfortune the file is not found, so it is revealed the missing file name and directory structure. In the php documentation itself there…
-
0
votes1
answer61
viewsQ: Condition with Jquery: Add attribute when it is not a certain class
In jQuery I know that: $("#minhaDiv .classe").attr("display","block"); Displays all child elements of the parent element #minhaDiv containing the class .classe, but I do not know how to make the…
-
1
votes1
answer26
viewsQ: SELECT in MYSQL resulting in only one record
I make a SELECT direct from the Phpmyadmin panel: SELECT `tx_type` FROM `tx_ar_tax` WHERE `tax_ref` = '75639' AND `tax_order` = 'O'; phpMyAdmin returns 7 records as registered and correct But in PHP…
-
4
votes1
answer223
viewsQ: PHP in_array()
My array $tx is: Array ( [tax_val] => Air bag ) testing: echo (in_array('Air bag',$tx['tax_val'])?'Existe':'Não existe'); Returns: Warning: in_array() expects Parameter 2 to be array, string…
-
1
votes3
answers86
views -
2
votes1
answer471
viewsQ: Fonts for numbers and fonts for letters
Hi, I’m making use of the Raleway font of CDN Google Fonts, but the numbers seem floating, the serif for the letters are good, clean, but for the numbers has a "dropped" aspectI thought I’d use…
-
0
votes1
answer200
viewsQ: Query records in table with jQuery
I created a input[type='text'] and a table HTML, and by entering a term in the field input[type='text'] the code I queried strings within all <tr><td></td></tr> and hides…
-
1
votes1
answer78
viewsQ: The . click() could not serve as a function handler since it only works with Function() to be executed?
I’ve been reading the documentation of jQuery because a question arose about the use of .click() and found nothing but the use of .click() with Handler Function() if in the documentation has nothing…
-
0
votes1
answer88
viewsQ: How to select an option from an input select with the value of $_GET with Jquery
The page receives a value for $_GET and would like to auto select the value of a select input equal to the value of $_GET received using Jquery: <?php $valor = $_GET['valor']; // valor1 ?>…
-
0
votes2
answers78
viewsA: Display next table id in a form input
You can create a TOKEN for service order instead of using the ID for this, which is not safe to use the ID as well as can not have control with multiple sessions making use of the system. I suggest…
-
0
votes1
answer113
viewsA: How to convert money mask to php
in PHP there is the function money_format() that can be used like this: echo money_format('%.2n', 12345.67); money_format always starts with %. The .2 indicates that you always want to use two…
-
0
votes1
answer26
viewsA: XML to DB with PHP and MYSQL
corrected by setting global variable for connection link $mysqli: ####### PREPARAR MYSQL INSERT if( !function_exists('insert_data') ){ function insert_data($valor,$cat,$desc=NULL) { global $mysqli…
-
0
votes1
answer26
viewsQ: XML to DB with PHP and MYSQL
I created a code that reads the XML and then inserts it into the MYSQL database, but only tries because an error is returned. It’s simple because I’m doing it for blocks. Filing cabinet conn.php…
-
2
votes3
answers2246
viewsA: How to disable a link semantically while maintaining accessibility?
The topic of disabling links appeared in my work the other day. Somehow, a "disabled" anchor style was added to our typography styles last year when I wasn’t looking. There is a problem: there is no…
-
0
votes3
answers1103
viewsA: Align button on the left side of a div
The correct thing would be for you to provide the tag <a> next to <input>: <div class="form-group row"> <div class="col-xs-2"> <label class="small"…
-
-1
votes2
answers2648
viewsA: Creating a simple database with NOT EXISTS
This way there is some problem in using DROP before CREATE? cd_rm_aluno I used it as an assumption, I don’t know which key reference you use, so you should change. ALTER TABLE `tb_outra` ADD…
-
0
votes2
answers92
viewsA: Problems with sending form
Make sure that when updating the page the request _POST is sent again. Enter this code in your form file: <?php if(isset($_POST)) { echo "<script>window.alert('POST…
-
1
votes1
answer35
viewsA: Check the registration field
Use a regular expression pattern: "/@gmail.com$/i" In practice: <?php if (!preg_match("/@gmail\.com$/i", $endereco_email)) { // Nao tem @gmail.com } ?> Learn more about regular expressions. I…
-
1
votes3
answers179
viewsA: How can I make a div disappear when I click a button
In your HTML: <input type="checkbox" id="toggle"/> Alters to: <input type="checkbox" id="toggle" onclick="meuMenuToggle()"/> And in HTML <div class="All"> Alters to: <div…
-
-1
votes3
answers1025
viewsA: What types of data exist in Mysql for storing text and integer numbers?
Key considerations on data types. Data types in strings Strings are strings of characters. In Mysql, a string can have any content, from plain text to binary data - such as images and files. Strings…
-
0
votes1
answer26
viewsQ: Result equal to the last two characters of the records
I tried to create an SQL for MYSQL to query only the records containing the last two characters, I did so: <?php $query = "SELECT * FROM `veiculos` WHERE `placa` LIKE '07%' ORDER BY `modelo` ASC;…
-
-1
votes1
answer98
viewsA: CSS margins using jquery-mobile
Make sure it works for you: <style> .ui-header, .ui-footer { margin: 0px auto; padding: 20px; } .ui-content { margin: 20px; } </style> <body> <div data-role="page"> <div…
-
0
votes1
answer53
viewsA: CSS3 2 Problems
If that’s what I understand, I’ve removed the unnecessary from the CSS: <style> * { margin: 0; padding: 0; } body { background-image: url(../../_img/fundo.jpg); background-size: cover;…
-
0
votes1
answer46
viewsA: How to leave the internal elements of a Section with two columns
I changed the CSS but don’t know what the reality of its interface, so change the width if the change is acceptable for what you need. <style> section.destaquestutisticos { float: left; width:…
-
0
votes2
answers157
viewsA: Sort an array of strings with dates
Setting your array to: <script> var array = [{id: 1, date: Mar 12 2012 10:00:00 AM}, {id: 2, date: Mar 8 2012 08:00:00 AM}]; </script> You can get a simple answer like: <script>…
-
0
votes2
answers86
viewsQ: Count GET parameters - PHP
How do I count how many $_GET parameters are filled in? I made a Count() in $_GET but it also counts the amount of empty values.
-
-1
votes1
answer121
viewsQ: Display result of different tables with similar data - MYSQL
I have never done this, I need to create a QUERY for MYSQL to display data from two tables, a table of the male gender and another of the female gender. I know that the correct thing is to create a…
-
2
votes1
answer55
viewsQ: How to filter the input of a form to the Database?
I have a function to filter input data to send to the database, I’ve been looking a little while and I thought that still has to improve, the default that I use is UTF_8, the data comes from forms…
-
0
votes2
answers307
viewsQ: Mysql - Query in related tables
The scenario is simple, SQL displays all the criteria results and there is a filter to select multi values that will be passed to SQL, which should refer to tbl2 in the field tbl2_criterio, and thus…