Questions tagged as 'php'

1
answer

Query Performance in MySql Database

What is the best performance option? I do select * from agenda, paciente where agenda.id_paciente = paciente.id_paciente and pick up the data together from the agenda and patient or do first select * from agenda and then another sele...
asked by 15.12.2014 / 17:06
1
answer

Calling python script through a php script accessed by the browser

I have a php script that will get uploaded videos and I would like to convert these videos using ffmpeg. I created a python script that receives php parameters and calls ffmpeg to do the conversion. index.php <?php $data = array('fil...
asked by 16.11.2014 / 02:29
4
answers

Add variables to get end date

I have a form with a lease registration. In it, I have the fields $datainicio , $meses and $datatermino . The start date I put automatic, according to the date of the day. The months should be placed at the time of registratio...
asked by 28.03.2016 / 20:19
1
answer

Login system with permission levels

I'm developing a login system with permission levels, however, at the time of logging in as administrator, on a page adm would be allowed to enter, the permission is denied. It's as if my SESSION was null, instead of adm being redirected to in...
asked by 19.04.2016 / 03:36
1
answer

How to create foreach (PHP / SQL)

I'm trying to send from a form to html, a table, with two fields with Array[] . These two fields are Service and Value, I want to add more than one product in form , and it inserts into different records in my table. I did...
asked by 26.04.2016 / 21:51
1
answer

How to redirect to the login page after a certain idle time in PHP?

As the title of the question says, I would like it at a set time where the user is idle, so the system will destroy the session and automatically redirect to the login page. I know that php has the function session_cache_expire () ( link ). Howe...
asked by 03.05.2016 / 22:34
1
answer

How to calculate percent difference (or similarity) between two strings?

I'm using PHP in an application I'm developing, where I have a text editor. In this text editor, with each change made, before saving, I create a record with the original data (that is, how they are before the change is complete). In addit...
asked by 29.06.2018 / 16:48
2
answers

Using a select with UNION or another mysql parameter

I am developing cash flow from my company and am encountering a difficulty. I have two different tables. A table is tb_compras(id, fornecedor, nfe, valor, data) and then I have another table tb_compras_historico_pagamentos(id, id_co...
asked by 08.06.2018 / 19:21
1
answer

Display a GIF from the beginning

Scenario I have a page that contains a div where content is loaded by JQuery and a div hidden ( hidden ), with a GIF: <div id="lista"></div> <div id="loading" hidden> <img src="loading.gif"/&g...
asked by 01.08.2018 / 17:08
2
answers

Refresh Div HTML PHP Javascript

I'm having some problems updating a div without updating the entire page. Here is the code: <div class="main" align="justify"> <div id="mensagens"> <?php echo file_get_contents('arquivo.txt'); ?> </div&...
asked by 19.11.2015 / 22:33