Posts by LipESprY • 4,525 points
187 posts
-
6
votes1
answer279
viewsA: Radar effect with CSS
Just add a delay in the animation of the second "wave" with half the time of the animation of the first wave: animation-delay: 1.5s;. Behold: body{ margin: 0; } #container{ display: flex;…
-
1
votes3
answers367
viewsA: Use value returned via ajax with switch case on current page
I formulated this answer exclusively thinking about the goal of the project: I take the value of select with onChange Displays a hidden div (displays the main form) The value is sent to return.php…
-
3
votes2
answers257
viewsA: Behaviour of the pseudo-class :Nth-Child
The selector nth-child(n) corresponds to each element that is the umpteenth son, regardless of the type, of his father. Source: W3schools - CSS :Nth-Child() Selector When using such selector, you…
-
1
votes1
answer2234
viewsA: How to change the website folder in Apache2?
To start I would like to change the folder destination, in case it is in: /var/www/html, I would like to put a directory in the documents for example 1) Open the configuration file for Apache:…
-
1
votes1
answer69
viewsA: How to insert at the same time without giving duplicate key error?
I will ignore the low quality of the body of the question and focus on the title: - How to insert at the same time without giving duplicate key error? And in the commentary: - duplicate key should…
-
1
votes1
answer666
viewsA: Difference between Error - Exception - Throwable within catch()
Throwable is the base interface for any deployable object. Source: PHP - Throwable Exception is the base class for all Exceptions in the PHP 5, and the base class of all user exceptions in the PHP…
-
1
votes1
answer5249
viewsA: Ajax and dataType JSON
If you simply copy and paste your request ajax, in thesis, it will work. But you should consider the following: I noticed that your file php services. returns an array of objects: the return is…
-
1
votes1
answer338
viewsA: Problems with the font-face
To solve your problem once and for all, I’ll introduce you to an excellent tool! 1) Download the source in question: Chisel; 2) Access the tool Webfont Generator on the website Font Squirrel; 3)…
-
2
votes1
answer150
viewsA: ajax with jquery - data format
serializeArray creates a matrix (array) (not a "json matrix" - there is no such thing); you can test this yourself with the console.log($("#myform").serializeArray()). On the other hand, serialize…
-
1
votes2
answers83
viewsA: Form to change value in the database
The old functions mysql_* were removed from PHP. You must use mysqli_* or PDO. I’ll make an example using Mysqli structured. But for now I only have this, I don’t know how to do the code in PHP 1)…
-
2
votes3
answers650
viewsA: How to pull Header over the top of a DIV?
Put your div with position: relative; and the header with position: absolute;: <!DOCTYPE html> <html> <head> <style> #titulo { background-color: mediumorchid; position:…
-
0
votes1
answer47
viewsA: Bring result of a sum on screen
in my case I am using a file that already bring the connection to the bank For starters, include and require have significant differences. In your case, assuming you are loading a configuration,…
-
0
votes2
answers340
viewsA: How to place an image inside echo and not show if it is empty
Alter: <?php if ($nome_imagem != null){?><p><img src="foto/'. $result1[$i][3] . '" class="foto"></p><?php } ?> To: <?php if (!empty($nome_imagem)) {…
-
3
votes1
answer72
viewsA: SELECT in auto-relational table
As the structure of your table has not been posted funcionario, I will suggest the following: CREATE TABLE `funcionario`( `id` int(11) NOT NULL AUTO_INCREMENT, `nome` varchar(255) NOT NULL,…
-
0
votes3
answers69
viewsA: Help with select in MYSQL
as I do to list for each city the oldest customers As the structure of your table was not posted, I will suggest the following: CREATE DATABASE `teste` DEFAULT CHARSET `utf8` DEFAULT COLLATE…
-
2
votes1
answer249
viewsA: Track AJAX requests in progress
Is there any way to verify that the request has not yet been completed by jQuery himself? A simple way would be to add a control variable. By completing the request of ajax, set a value on that…
-
1
votes4
answers183
viewsA: Compare if password is correct
Like the @Maniero has already mentioned: It doesn’t make much sense to do it in real code because it doesn’t give any security But, taking it as an exercise, you can do it like this: errou = 0;…
-
6
votes2
answers384
viewsQ: Can the <link> tag be used outside the <head> tag?
Practically all documentation relating to tag <link> suggest her call inside the block <head></head>. Example: <head> <link rel="stylesheet" type="text/css"…
-
4
votes2
answers1118
viewsQ: What are the differences between Lightbox and Modal box?
I’m developing a system of login for a project and came to me the idea of putting the form in a "window to the center of the screen" superimposing the contents of the current screen. Researching…
-
0
votes2
answers89
viewsA: Does the prompt command change the value?
Must convert values passed via prompt for float: var ap1 = parseFloat(prompt("Nota da ap1")); var ap2 = parseFloat(prompt("Nota da ap2")); var ap3nota = 5 - ((ap1 + ap2) * 0.3); var ap3questoes =…
-
1
votes2
answers32
viewsA: Webmail CSS alignment
The ideal would be to use div, instead of span. But you can solve it by adding the attribute display: inline-block; on your tag span: <table> <tbody> <tr bgcolor="#fff"> <td…
-
2
votes4
answers6441
viewsA: Format Real value (br) to decimal (10.2) mysql
whereas the Mysql/Mariadb expect a value of the type float for columns type decimal(), you must format your number before inserting in db. Respecting this, I did this function (structured): function…
-
2
votes3
answers7344
views -
1
votes1
answer51
viewsA: Add values to a database by PHP
1º I want, when clicking on my Submit button, the addToDB() function to be executed and at this moment I do not understand the process of how to do it. Your code is all mixed up. The function of the…
-
2
votes2
answers94
viewsA: Login panel does not return the number of accounts
but a blank screen appears on the page Most likely to fall into this condition: if (isset($_POST['email']) && isset($_POST['senha'])) { I’m a beginner, and I couldn’t quite understand what…
-
1
votes1
answer27
viewsA: Apply number_format in variable
Initially, the problem is that you are converting the string "0,25" in float: $foo = "R$ 0,25"; $stock_unity_push = str_replace(".", "", str_replace("R$ ", "", $foo)); var_dump($stock_unity_push);…
-
2
votes2
answers92
viewsA: Calling the Javascript function with just one click
I would like to know how to call more than one function with just a "Click". Simple, call the function as many times as you want. In theory, it would look like this:…
javascriptanswered LipESprY 4,525 -
3
votes2
answers129
viewsA: SQL & PHP - Select everything using Where
if you wanted to filter the films also by year of release, director and indicative rating, all at the same time and with the same option to display all If you want to do all together, would look…
-
4
votes1
answer135
viewsA: Regex - Take format without strings around
1) Searching for the asterisks: \*([^\*]+?)\*(?!\*) 2) Adding tags to bold: <strong>$2</strong> Now just apply in your project: let str = 'Lorem *ipsum dolor* sit amet, *consectetur**…
-
1
votes2
answers980
viewsA: Indefinite Index - PHP
Notice: Undefined index: name in C: xampp htdocs store add-product.php on line 4 Notice: Undefined index: preco in C: xampp htdocs loja adiciona-produto.php on line 5 These errors are saying that…
-
2
votes1
answer48
viewsA: User-friendly URL receiving p/PHP value
Add this to your .htaccess: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^embed\/([0-9A-z_-]+)$ embed.php?id=$1 [QSA,L,NC] </IfModule> If you already have this code block in…
-
1
votes2
answers1874
viewsA: Take custom attribute value "data-attribute" within a loop
1) The selector it must be so: input[data-selected]. What’s going fetch the inputs that have the attribute data-Selected defined. Source: jQuery API - Has Attribute Selector 2) To receive the value…
-
1
votes1
answer25
viewsA: How do I change my root password in windows?
Stop the Mysql completely. This can be done by accessing the Services window Windows XP, Windows Server 2003 and the like, where you can stop the service Mysql. Open the command prompt by typing cmd…
-
5
votes3
answers1020
viewsA: Partially paint border in CSS
a.bordaAnimada { text-decoration: none; background-color: Tomato; color: #fff; padding: 20px; display: inline-block; font-family: arial, sans-serif; position: relative; } a.bordaAnimada:after {…
-
0
votes1
answer123
viewsA: Convert Encoding to JSON
Do with the Notepad++! Usually it will identify the encoding of your file. If not, just mark the current encoding and then click on Convert to UTF-8. Recommend UNWELL.…
-
0
votes2
answers30
views -
0
votes2
answers205
viewsA: How to show a div with scrollTop after certain pixels?
Based on your code, I did so and it worked: var position = $(window).scrollTop(); // should start at 0 $(window).scroll(function() { var scroll = $(window).scrollTop(); if(scroll > position) {…
-
1
votes3
answers179
viewsA: Make an input receive a value less than another
document.querySelector('[name=valor-em-dinheiro]').onchange = function() { console.log('change disparado'); if(this.value < document.querySelector('[name=total]').value) { alert('Valor em…
-
1
votes1
answer31
viewsA: Hosting server exchange for websites
(sic) What do I really need for this exchange to be made? The agency that owns his website, domain and hosting must change the DNS to my server, correct? You should point the domain to your server.…
-
1
votes1
answer471
viewsA: DELETE specific row from a table with PHP and AJAX
However, when I click on this button, only the first row of the table is deleted and not the row I chose to delete. Your page is having several elements with the same id. As such, its function…
-
1
votes2
answers663
viewsA: How to send php variables to the html page?
The concatenation operator of strings in the PHP is the dot: . ! Take an example: <?php $string = 'texto qualquer'; echo 'Este é um ' + $string; // Exibe "0" echo 'Este é um ' . $string; // Exibe…
-
0
votes2
answers57
viewsA: how to consult by month?
(sic) I am trying to make a query that will return me the current month Solution (assuming your db is Mysql or Mariadb): SELECT `dia` FROM `caixa` WHERE `data` >= '2018-12-01' AND `data` <=…
-
0
votes1
answer956
viewsA: Fix navbar and give horizontal scroll on content
How do I enable scroll only on the X axis? (sic) I want to leave the navbar fixed when it rolls sideways and not down div.topo { position: absolute; top: 0; left: 0; right: 0; height: 70px;…
-
0
votes2
answers233
viewsA: Error when associating connection variable (PHP/Mysqli)
I’m finding it difficult to call a variable from an auxiliary php code, which connects to my database, in my HTML page I basically copied and pasted your code, and it all worked. Soon after, I gave…
-
1
votes2
answers1029
viewsA: Consult two tables without foreign key and relationship
First I created the two tables and entered the data as posted in the question (Remember to post in the next questions, it makes it much easier for those who help you): CREATE TABLE `tb_pedido` (…
-
1
votes2
answers343
viewsA: How to do a countdown with jQuery that restarts weekly
I have to do a countdown for a promotion. <!-- Display the countdown timer in an element --> // Set the date we're counting down to var countDownDate = new Date("Jan 5, 2019…
-
0
votes1
answer42
viewsA: How I can remove and print the textbox value associated with a php checkbox
How I can remove and print the textbox value associated with a php checkbox You must associate by modifying the attribute name in a way that differentiates inputs and checkboxes. PS: It is also…
-
2
votes1
answer31
viewsA: Use AND and OR operators on the same condition
in this case it displays the services page Note that in $pagina = "home" you are attributing o a string home for the variable $pagina! For comparisons, the operator is == (Compare the value) or ===…
-
1
votes2
answers454
viewsA: Submit being called twice
even using preventDefault(); and Return false; Submit is running twice. Note the comments: $("#frmTeste").on('submit', function (e) { // AO SUBMIT e.preventDefault(); // NÃO EXECUTAR O PADRÃO…
-
1
votes1
answer111
viewsA: What is the best Mysql type to store numeric values
number of waves in numerical values Whereas there will be no negative number, the field may be of the type int unsigned which will store from 0 to 4294967295. If it is an immense db and is…