Posts by Vítor André • 579 points
22 posts
-
2
votes4
answers2194
viewsA: Subtract one hour from Current time
$hora = "00:12:00"; echo date("g:i:s", srttotime("-1 Hour", strtotime($hora)));
phpanswered Vítor André 579 -
0
votes2
answers45
viewsA: Scroll Gigantic
Your problem is in your Divs class="lbox" If you use the browser inspector you will see that these Divs all "fall" from your layout. Review the css of that part there.
-
3
votes1
answer1303
viewsA: How to block access to a page from the url
With this code you prevent direct access: if (strcmp(basename($_SERVER['SCRIPT_NAME']), basename(__FILE__)) === 0) { header("location: index.php"); }
phpanswered Vítor André 579 -
1
votes2
answers1664
viewsA: query system with php
Remove the <br> improperly concatenated in Posts, otherwise the comparison does not work. $questao1 = $_POST['questao1']."<br>"; // errado $questao1 = $_POST['questao1']; // certo…
phpanswered Vítor André 579 -
1
votes1
answer2573
viewsA: when selecting a value from a select, a div appears
Look what I’ve done: $('#opt').change(function(){ var valor = $('#opt').val(); $('#mostra').css('display','block') $('#mostra').html(valor); }); #opt{ width:100px; padding:3px 5px; font-size:18px; }…
-
2
votes2
answers962
viewsA: Friendly URL, images do not appear even putting absolute path
Put that on the head of the site: <base href="http://localhost/Sua_Pasta/"> if you are working locally or <base href="http://seusite.com/"> if you already have them in the accommodation…
-
3
votes1
answer442
viewsQ: Search in different tables knowing what the result came from
I’m trying to find a term in 4 different tables in Mysql, using like, but I need to rescue the id of each and identify from which table came to make the listing and direct with link. This is a…
-
1
votes2
answers971
viewsA: Add HTML TAG with CSS content
Using after or before you can add some content to your tag and style it but if you use tags inside the content will be interpreted literally as text. #teste:before{ content: "<a…
-
2
votes2
answers234
viewsA: Confirmation question before entering into database
In the link going to that page you create a js confirm <a href="pagina.php?acao=inserir" onclick="return confirm('Tem certeza?')">Link</a>
-
1
votes2
answers215
viewsA: Insert a dot in the penultimate variable item
for (i in teste) { for (j in (teste2[teste[i]])) { valorFinal[j] = (resultado1 + resultado2); var res = valorFinal[j].toString(); var dec = Math.floor(res.length - 2); var resp = res.substring(0,…
-
2
votes1
answer5653
viewsA: Control image overlay and HTML CSS text
If below is overlaid, use z-index in css. The higher, the more "top" the layer of it. If the item that should be "above" is the text: #texto { position: absolute; margin-top: -40px; z-index:9999; }…
-
0
votes3
answers711
viewsA: Split form with radios in 2 columns
Define a width for your div radio and put a float: left.
-
4
votes3
answers714
viewsQ: Is filter_var() sufficient to avoid SQL Injection?
Handling input variables in a Mysql query using filter_var is sufficient to avoid Injection?
-
-1
votes1
answer469
viewsQ: How to change the background color of an image?
I need to change the white background color of images using programming. Does anyone know how to proceed?
-
1
votes1
answer68
viewsA: How to edit registered data so that when selecting the registration to be changed, its data will appear in the same form that was created?
Use a call to define the function (if it will be Edit, Insert, etc). Let’s simulate for the $_GET. Example: On the.php data page you will receive by URL dados.php?funcao=Editar&id=2…
-
1
votes1
answer58
viewsA: Help combobox php
<html> <?php require("basedados.h"); if ($_POST(["nome"])) { $sql = "DELETE FROM utilizador WHERE nome = '$nome'"; $resultado = mysql_query($sql); echo " Registo Apagado!<p>"; } ?>…
-
1
votes2
answers146
viewsA: Spacing between tbodys
Set a width for the table a float:left and a margin-bottom for tbody.
-
1
votes1
answer1381
viewsA: Validating form for the same page only by clicking
Use so before codes using form data: if (isset($_POST['consulta'])) { código }
-
1
votes1
answer33
viewsA: Help with jQuery UI "tabs"
I made a few modifications to your script. http://codepen.io/vitorandre/pen/KzomxM Next: Add an ID in the category li. I used Cat1. Put a display:None in css. liCategory In jquery add a function…
-
0
votes1
answer210
viewsQ: Because input does not appear in php Function output
I created a function (I’m doing some experiments) to generate input, textarea, select, etc, through Function. But the result is partial. There is no error in the function, but only what is text…
-
2
votes2
answers964
viewsA: How to send an email after a new mysql registration
You have to take the script that makes the insertion and at the end of it check. Do an if to confirm that the record was inserted correctly. If yes, enter the email script, using the e-mail that…
-
0
votes2
answers304
viewsA: Floating chat on the page
You can solve this using CSS. With position:fixed; So it always gets visible, even rolling the screen.
javascriptanswered Vítor André 579