Posts by Hugo Borges • 5,294 points
332 posts
-
1
votes1
answer432
viewsQ: receive form with var_dump
Guys, currently I send one form with several POST, I receive them all and add them in the BD. However I am seeing a method using the var_dump, but I don’t know how to implant it into my code. An…
phpasked Hugo Borges 5,294 -
1
votes1
answer56
viewsQ: redirecting with htacess
Guys set up my htacess to pick up any word I type in the URL and search for the php file. It works like this: www.meusite.com.br/City and it redirects to www.meusite.com.br/Search/City.php The code…
-
0
votes1
answer46
viewsQ: allowing access to the webserver only with android
Guys I have a folder on my site called webserver, within it I have several php files that mount the json that is sent to my app that I am mounting. However I wanted to block this folder so that it…
-
-3
votes1
answer44
viewsQ: validating a string
People need to validate a string with php. This string can contain only integer numbers, and will be separated by commas. She can count multiple numbers, and she can’t finish and she can’t start…
phpasked Hugo Borges 5,294 -
1
votes1
answer50
viewsQ: How to update recovering value from another table?
I have a chart in my comic book called contas. Where I log all system accounts. As soon as they get paid I perform a update changing her status. However, I send a single update to several accounts,…
mysqlasked Hugo Borges 5,294 -
-2
votes3
answers123
viewsQ: check a string with php
I have an input where the user informs several product codes, and the system returns a list. But I need to validate the string that is to check this exactly as: 132,234,14,56 That is, each code…
phpasked Hugo Borges 5,294 -
4
votes2
answers4179
viewsQ: Validating CPF and CNPJ with php Function
Guys I have two Unction, being them valida_cpf verifying the Commission and valida_cnpj that checks the cnpj. Well both work perfectly, but I wanted to know if it is possible to merge the two, ie…
phpasked Hugo Borges 5,294 -
3
votes2
answers4231
viewsQ: How to assign HTML code to a Javascript variable?
I have the following HTML code: <table class="al-center" style="width: 520px;"> <tr> <td> <div class='form-group'> <label class='control-label' for='auto'>RECEBIDO…
-
1
votes2
answers244
viewsQ: Adding more input with jQuery
Guys I have a simple form with 3 input. I need to enter a quantity in the 'Qtd' input, and with that I need jQuery to multiply the table with the form, and change the 'name'. Example; If I enter 3…
jqueryasked Hugo Borges 5,294 -
3
votes3
answers6169
viewsQ: lock enter inside an input
Guys I have the following input inside a form: <input type='text' class='form_campos form_campos_nome' id='auto' name='verifica_nome3'> I need to block the enter key inside it, that is, when…
-
29
votes7
answers68940
viewsQ: How to make SELECT with ORDER BY and different criteria?
People can select with 2 "ORDER BY"? Table CATEGORY: If I make a SELECT like this: select id,nome from CATEGORIA ORDER BY nome ASC Mysql returns the names in alphabetical order, but I need it to…
mysqlasked Hugo Borges 5,294 -
2
votes2
answers453
viewsQ: Change the home page via htaccess
People when accessing my site apache automatically loads the page index.php. It is possible to change this in the htaccess? I want him to always search the page Login.php.…
-
0
votes0
answers39
viewsQ: check whether you have finished zipping php
Guys I’m compressing a photo folder from my website for backup, I use Ziparchive to do this. After the zip is created I close it with $zip->close();. How do I make php give an echo so after the…
phpasked Hugo Borges 5,294 -
0
votes1
answer1070
viewsQ: how to remove.php with . htaccess
Good guys I’m used to calling the following link with my apache: index.php?variavel1=1&variavel2=2 Can I make my . htaccess identify the following link: index?variavel1=1&variavel2=2 And…
-
2
votes1
answer1015
viewsQ: Create zip archive of a folder
Guys I have a folder called Photos, how do I create a photo.zip archive with all the photos inside?
phpasked Hugo Borges 5,294 -
2
votes1
answer334
viewsQ: check if the file is in use with php
Guys I have a file called photo.zip, where people can download it on my site. I want to create a php file that crontab will run every 10 minutes, and check if the file is being downloaded by…
-
2
votes1
answer62
viewsQ: convert content into input
Galera use a javascript script to convert everything I type, inside the input to uppercase. But I have a specific input where I can’t change its content. How can I do this? Follows the code: //…
-
2
votes1
answer328
viewsQ: block upload greater than 2mb with PHP
Guys like me block an upload larger than 2mb? I’m capturing the file like this: $imagem = $_FILES["imagem"];
phpasked Hugo Borges 5,294 -
3
votes2
answers2074
viewsQ: change png image to jpg with php
Guys I put together a PHP script that uploads a photo. The problem is that I need to convert it to jpg and to the size of 280px x x 280px. Does anyone know how to do that? I have to save as much…
phpasked Hugo Borges 5,294 -
4
votes1
answer2154
viewsQ: Check the difference between two dates in months
Guys I need to put together a code on php where I enter 2 dates and it returns the difference in months. Example: $data1 = "2016-03-01"; $data2 = "2016-06-10"; Resultado 3 meses Example 2: $data1 =…
phpasked Hugo Borges 5,294 -
1
votes1
answer70
viewsQ: calculation between two defined dates
I have the following code on PHP: $valor = 120; $data_inicio = '2016-06-15'; $total_dias = date('t', strtotime($data_inicio)); $used = date('d', strtotime($data_inicio)); $result =…
phpasked Hugo Borges 5,294 -
1
votes1
answer73
viewsQ: Calculating a value proportional to the date of the month
Guys I’m putting together a script on php which will be executed on the first day of each month, generating a receivable based on a value of 120.00. That is to say on the first day of each month he…
phpasked Hugo Borges 5,294 -
4
votes3
answers607
viewsQ: check query in 2 tables at the same time with mysql
I have two tables in my BD (mysql), where: 1st Table: CADASTROS With the following fields: ID, NOME, IDADE, CIDADE 2nd Table: FUNCIONARIO With the following fields: ID, ID_CADASTRO, PROFISSAO,…
-
0
votes3
answers50
viewsQ: Comparator difference in php
People what the difference of the following codes in php? if ($resultado_barganha->tipo === "t") { } And: if ($resultado_barganha->tipo == "t") { } From what I’ve noticed they do the same…
phpasked Hugo Borges 5,294 -
0
votes1
answer48
viewsQ: error with javascript function
Galera have and following code in javascript: <script> $('.valores,#qtd,#qtd_bo').mask('00.000.000,00', { reverse: true }); </script> It is a mask plugin, and works perfectly. However my…
javascriptasked Hugo Borges 5,294 -
2
votes4
answers296
viewsQ: Correct way to use php’s abs function
People what is the correct way to use this function? first : $limite = \abs($resultado_cadastro->limite); 2nd: $limite = abs($resultado_cadastro->limite); Both work, but netbeans says the…
phpasked Hugo Borges 5,294 -
0
votes1
answer160
viewsQ: how to define a minimum resolution
Well I am mounting a system in php for box control. It will be a system aimed only for computers, IE will not be responsible. I created the menu, box information and etc... This is all 100%, however…
-
0
votes2
answers179
viewsQ: Build responsive menu with CSS
Guys I set up a very simple menu, but I don’t know how to put it to be responsible. The problem I’m having is this. The 2nd menu is ok, but the first one generates a line break, because there are…
-
-3
votes4
answers926
viewsQ: How to use css align for tables
Galley as I mount this table in css? <table border="0" align="right"> I want to know how to align a table right using css.
-
4
votes0
answers52
viewsQ: Object and Procedural Oriented Programming in PHP at the same time
Guys I have a PHP system that I have been developing for over a year. It was written practically procedural, because I adapted better, and I find it simpler to work. My question is the following:…
-
0
votes2
answers369
viewsQ: include with html file
Galera assembled a file called php.php as follows: <?php $nome = "nome"; $idade = "25"; $peso = "78"; include "layout.html"; This file includes the layout.html file, which is so: <table…
-
2
votes1
answer1020
viewsQ: button with link inside the form
Guys I got a form with 2 button within. 1 and Ubmit and the other need to put a link in it. When clicked it cannot send the form and call the link. Follows my code: <form name='form' method=post…
-
3
votes2
answers423
viewsQ: how to align center with css
Guys I got two button that are aligned in the center using display: block;. The problem is that one sits on top of the other, to stand next to the other I used display: tale-cell; and the problem is…
-
4
votes1
answer234
viewsQ: Recover css with jQuery
Galera set up a table where I click with the right button and the line turns yellow, and displays a menu. Everything works 100%. The problem is that when I click elsewhere and the menu closes and…
-
1
votes1
answer121
viewsQ: how to use the SUM within an ORDER BY (mysql)
I have the following select in mysql: SELECT DISTINCT a.id, a.unidade, a.posicao, a.nome, a.peso FROM produtos a, produtos_pedidos b WHERE a.id = b.id_produto and b.id_pedido IN (13,12,11) ORDER BY…
mysqlasked Hugo Borges 5,294 -
3
votes1
answer286
viewsQ: How to make border CSS inherit color?
Guys set up a simple container using CSS. For me to do the DIV that gets the text stick with blue background I ground a class I created to put background where I call it. But I need to put the blue…
-
4
votes2
answers720
viewsQ: clear input with event onchange javascript
Guys I have 2 input: <input name='nome1'> <input name='nome2'> I need to create a javascript that clears Nome2 when the value of name1 is modified. Can someone help me make it very…
-
3
votes2
answers4351
viewsQ: Doubt how to format value using Chart JS chart
Guys I’m using a plugin for Jquery called Chart JS. Good and very simple to work with the plugin, the problem is that I report values in the American standard (33.33) and I need the graph to display…
-
4
votes1
answer6938
viewsQ: How to pick up mouse position relative to page?
I have a menu that opens when I right click on the table. The problem is that I could not get the mouse position when the page has scroll. I noticed that you’re taking the Y X based on my monitor,…
-
0
votes1
answer57
viewsA: problem with firefox menu
Good solved the problem this way: $("body").mousedown(function (e) { // Verifica qual botão clicou if (e.button !== 2) { // Remove o CSS da linha selecionada…
-
1
votes1
answer57
viewsQ: problem with firefox menu
Galera set up a table where I right click on it and open a menu. The problem is that in firefox I have to give 2 clicks. And it keeps closing when I move the mouse. I have tested on all browsers and…
-
4
votes1
answer292
viewsQ: Open a div according to your ID
I have a menu that, when right-clicking, it opens in a DIV. Everything happens within a tr (line) of a table. My problem is this, have a table with several tr, and each of them receives a ID. And I…
-
0
votes1
answer271
viewsQ: Menu effect inside the table
People, when right-clicking on the word menu a small menu opens. How do I make this happen inside the table’s (row) property? document.oncontextmenu = function() {return false;}; //não deixa abrir o…
-
4
votes2
answers2097
viewsQ: Make div appear when right-clicking mouse
Guys I use the function (Hover) to make a DIV appear, I wonder if there is a way to make it appear when right-clicking. That is, a child DIV appears when I click on a parent DIV right-click. Follow…
-
0
votes1
answer138
viewsQ: Custom context menu recovering table id
Good guys I’m trying to set up a custom context menu that will work within a registration table. The problem is that I need to take the ID inside each line () and call it in the menu link (Edit.php?…
-
-2
votes3
answers488
viewsQ: responsive menu with jQuery and css
Galera I set up a menu that appears when placing the cursor over the letter B. The problem is that when it is aligned to the left the menu disappears in the corner of the page. If I remove the line…
-
1
votes1
answer85
viewsQ: Problem with css menu
Guys I set up a menu in css that works very well, the problem that when placing the mouse cursor on top of menu letter it changes, it seems to change its edges. Can someone help me solve this?…
-
0
votes2
answers53
viewsA: autocomplete works only with jQuery 1.2.6
The solution was to remove the @ $(this).parent().find("input[@name=b]").val(data[1]);
-
0
votes2
answers53
viewsQ: autocomplete works only with jQuery 1.2.6
Well I am using an autocomplete plugin with 2 input, where I put the value in 1 input and the 2nd and filled. The problem is that my system works with jQuery 1.7.2, because I have several functions…
-
0
votes1
answer87
viewsQ: auto complete jQuery with 2 input
I have the following autocomplete that works in the first input, when completing it fills in the 2nd input. The problem is that if I delete the tag <p> it doesn’t work. Someone can tell me…