Posts by LipESprY • 4,525 points
187 posts
-
0
votes2
answers108
viewsA: How to delete array value by one of the elements?
<?php $foo = [ 1 => ["ordem" => 2, "img" => "banner.jpg", "chave" => "imagem_5adbea7baefaf"], 2 => ["ordem" => 2, "img" => "Untitled-6.jpg", "chave" =>…
-
0
votes2
answers98
viewsA: Take input value to run in the for loop
No no where is 10, I want to put the value that the user will put, how do I do this? Just pass the value of input as a parameter for your function: <script> $(document).ready(function(){…
-
1
votes3
answers209
viewsA: Pass value to variable
could give me an example of how it would work based on the code I passed up there? Form file (.php): <?php // INICIALIZAÇÃO DAS VARIÁVEIS: $estados = array("RIO DE JANEIRO", "ESPÍRITO SANTO",…
-
0
votes1
answer262
viewsQ: Mysql - Clause problem WHERE `column` != NULL [BUG? ]
I came across the following problem: In my application I have a function that checks whether some value is already in use in another record, soon I must pass the id of the current record to delete…
-
1
votes1
answer56
viewsA: Php separate json ond fields are default
Have you ever tried a foreach in array $dados['questionario']? Incidentally, his JSON is wrong: [...]nario":"{"Bom dia[...] should be [...]nario":{"Bom dia[...]. But in case you return more than one…
-
2
votes2
answers283
viewsA: Require and include
In file systems case-insensitive, as is the case with Windows, it makes no difference. However, Linux is case-sensitive! In my own experience, I used the files with the tiny names and the Autoloader…
-
0
votes1
answer105
views -
3
votes2
answers86
viewsA: Change image by CSS depending on the access device
1: The Viewport Add to viewport within the tag head: <meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0, maximum-scale=10, minimum-scale=1.0"> 2: CSS…
-
0
votes4
answers3179
viewsA: How do DIV fill 100% of the display?
1 - Defining the tags html and body with height:100%; html, body { height: 100%; } * { box-sizing: border-box; margin: 0; padding: 0; border: 0; border-spacing: 0; } div.foo { width: 100%; height:…
-
0
votes1
answer93
viewsQ: jQuery plugin with trigger in event click
jQuery plugin: (function($){ $.fn.extend({ meuPlugin: function(){ $('body').on('click', this, function( e ){ console.log( $(this).attr('href') ); return false; }); } }); })(jQuery); Selector in…
-
0
votes2
answers362
viewsA: Sort Numbers and seasons correctly
Mysql Documentation: ORDER BY Optimization SELECT * FROM `tabela` ORDER BY `temporada`, `numero`; You can also change the order of each field with ASC (Smaller to larger) and DESC (greater for…
-
-1
votes3
answers1959
viewsA: How do I restrict access from a page to logged in users?
1 - Header error: Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /srv/disk4/2609189/www/grupodeestudos.atwebpages.com/site/index.php:1) in…
-
2
votes1
answer312
viewsQ: Mysql How to return only part of the result of the FULL-TEXT query
Let’s say I have this text stored in a table in my database: Lorem ipsum dolor sit Amet, consectetur adipisicing Elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad…
-
0
votes3
answers363
viewsA: Problem with Between in Mysql?
Columns of the type varchar cannot be consulted with a intermission. You must convert your table to type datetime then consult the records by setting a range. Try using the same pattern as the…
-
4
votes1
answer1572
viewsA: Mysql - What data types should be in quotes?
Data of the numerical type don’t need quotation marks, date/time and string types (string) need be defined with quotation marks! Among the main: QUOTE-FREE (Numerical): TINYINT, SMALLINT, MEDIUMINT,…
-
4
votes1
answer1572
viewsQ: Mysql - What data types should be in quotes?
I’m developing a script for backup/dump from my database via PHP, but when saving the file, I need to put, or not, quotes according to the type of the column. So far so good! But what types of data…
-
1
votes3
answers2658
viewsA: Div responsive with image and other elements inside
When it comes to Responsive layout, is worth treating basically the following: Viewport: The viewport is the area where your website appears. It is the white area of the window when you open the…
-
0
votes2
answers799
viewsA: Can I return 2 value in an Ajax?
I’ll give you two working forms: Pass the id by the method GET, adding the value in action of form: Form: <form action="pagina.php?id=123" method="post"> <!-- [...] --> </form>…
-
0
votes1
answer114
viewsA: This gives error: Can’t create table when creating this table in Mysql using Foreign key
Your greater problem was creating two primary keys for the same table (clientes(cpf) and clientes(estadia)): CONSTRAINT fk_impar_clientes FOREIGN KEY(cod_cliente) REFERENCES clientes(cpf) ON DELETE…
-
1
votes1
answer526
views -
1
votes1
answer966
viewsQ: Show HTML via PHP or not?
In fact, it’s very common to see all the code HTML escaped inside the tags PHP. "For printing large blocks of text, going out of PHP’s interpretation mode is usually more efficient than sending all…
-
1
votes1
answer85
viewsA: Mail PHP - Sending without information
You can create a function to validate past information via POST: <?php function validarPOST( $arg ) { if( isset( $_POST[$arg] ) ) //CHECA SE FOI PASSADO VIA POST { $arg = trim( $_POST[$arg] ); //…
-
1
votes3
answers186
viewsA: Doubt validate . click() outside of Function() jQuery
Try the following (script): $(function() { // .delete recebe o id que devo deletar.. $(".delete").click(function(){ id = $(this).attr("id"); info = 'id=' + id; $('.pop').fadeIn("slow"); });…
-
24
votes2
answers40270
viewsA: How do I mask an input?
You can also do it with pure Javascript! <!DOCTYPE html> <html> <head> <title>Máscara CPF</title> <script type="text/javascript"> function fMasc(objeto,mascara) {…
-
1
votes1
answer965
viewsA: Background overlay
With a basic technique of overlapping, I did some tests and will post my conclusions/opinions at the end. Since I don’t have the source code, I created the following code: <!DOCTYPE html>…
-
0
votes4
answers1886
viewsA: How to make an input not accept blank input?
How you are capturing the event click of the element #palavra, the browser ends "overtaking" of the field check and running the function buscar(). When you "submits/" the form, the browser itself…
-
1
votes0
answers182
views -
0
votes1
answer141
viewsA: Array result returns null
I need from the option selected in select, I see in the bank what is related to this option. No way to use the PHP in the client-side (@Andersoncarloswoss). For that reason, one can: Make a second…
-
1
votes1
answer692
viewsA: Get print data json in real time
Yeah, you can work it out with Ajax / jQuery: Home page (index php.): <!DOCTYPE html> <html> <head> <title></title> <script type="text/javascript"…
-
0
votes1
answer61
viewsA: How to block page scrolling without hiding the bar?
I found that code Javascript in the English stack: How to disable scrolling temporarily? // left: 37, up: 38, right: 39, down: 40, // spacebar: 32, pageup: 33, pagedown: 34, end: 35, home: 36 var…
-
2
votes1
answer418
viewsQ: Error Reading XML with namespace in PHP
I need to access the value of tags numeroCNS, dataAtribuicao, etc of the following file XML: <?xml version="1.0" encoding="UTF-8"?> <soap:Envelope…
-
4
votes2
answers80
viewsA: Php value in javascript?
Change: <?php $variavel;?> To: <?php echo $variavel;?> <?php $variavel = "-3,3462, -60,6790"; ?> <script> var testMarker = L.marker([<?php echo $variavel;?>],{icon:…
-
0
votes1
answer150
viewsQ: Register changes in Mysql
Precise record all changes in the database, as UPDATE, INSERT and so on, so that I can restore the last backup and run queries from the last backup, manually deleting the unwanted wishes. I read…
-
1
votes1
answer102
viewsA: Interaction between pages
SOLUTION: Following the "Way of the Indians" indicated by @leo-Caracciolo: @lexmihaylov: Send a refresh request to Another page opened in the browser, managed to solve by manipulating the page A…
-
2
votes1
answer102
viewsQ: Interaction between pages
I have a question and would like some tips to update a page through another page. Example: On page "A" I have a list of products and a link to page "B"; Page "B" will open in a new tab and has a…
-
0
votes2
answers542
viewsA: Arduino + Module SIM900 + PHP + Mysql - POST method problem
Of: $variavel1=$_GET["variavel1"]; $variavel2=$_GET["variavel2"]; $variavel3=$_GET["variavel3"]; $variavel4=$_GET["variavel4"]; To: $variavel1=$_POST["variavel1"]; $variavel2=$_POST["variavel2"];…
-
0
votes2
answers70
viewsA: Is it possible to do this with table td?
@media cannot change the HTML encoding, only the style of each HTML element. Interesting would be you use div with percentages.