Questions tagged as 'php'

3
answers

Problem adding a date to an array index

I am passing a date into an index of a Array . As looping is performed, this Array is being fed. The index is also generated through this looping. However, when starting the index, it displays only 1 character (as if it were "fragme...
asked by 28.08.2015 / 14:36
1
answer

PHP - Upload file in different folders

I have to make a PHP script that sends a single upado file to multiple folders (listed in the root of the server dynamically). The problem is that the first upload is done without problems, then I can not send it to the other folders. EXEMPLO:...
asked by 10.06.2016 / 21:17
4
answers

Verify which is the variable with greater value returning the variable not the value

I would like to know how to return the largest number variable but not the value but which one is larger. For example: $valor_01 = 6; $valor_02 = 4; $valor_03 = 3; $valor_04 = 9; $valor_05 = 8; $valor_06 = 5; echo max($valor_01, $valor_02,...
asked by 25.08.2015 / 14:44
3
answers

Doubt when using ON DUPLICATE KEY UPDATE

I'm trying to use ON DUPLICATE KEY UPDATE in my query and for some reason is not working. I remove the ID and do not use ON DUPLICATE KEY UPDATE : the values are saved in a new line in the bank. Example: $sql = "INS...
asked by 14.09.2015 / 17:50
2
answers

Update with Codeigniter

I'm trying to update my database using codeigniter, but the update is not running. HTML: <?php echo form_open('Texto/alterarTexto', 'class="form-horizontal"'); ?> <fieldset> <legend>Novo texto</legend> <...
asked by 14.09.2015 / 16:50
1
answer

Find specific day of the week between dates

I have the following code to post to a calendar days and times available and for this I use the following routine: //recebo dados do formulario //inclusive o dia da semana ex.: Friday $dia_semana = $_POST['dia_semana']; $hora =...
asked by 23.06.2016 / 16:10
2
answers

Calculate time logged - PHP

Does anyone know how I can calculate the total amount of time a user is logged into my site? Considering that you need to pause the time count when closing the browser.     
asked by 10.08.2015 / 03:07
1
answer

Using mysqli to count records

I need to do a log count. I used: mysql_num_rows($consulta); How do I do the same thing using mysqli? Because I'm doing it this way: $tabela_usuarios = "SELECT * FROM owner WHERE owner_email='$email' AND password='$password' "; $resul =...
asked by 21.08.2015 / 17:23
1
answer

How to create function to automate a dynamic progress bar?

I have a form with some "modules" (module = a set of questions - I do not know if it is the appropriate technical term ...), so that, depending on which module is chosen, a certain amount of questions will be inserted in the form to be answered....
asked by 13.12.2015 / 16:45
3
answers

How to use multiselect value in php

I'm getting a value from a multiselect and sending it via ajax: Assuming the value of the multiselect to be: ["1","2","3"] // é esse valor que está sendo enviado (value do multiselect) After rescuing this value in the php file that you...
asked by 06.12.2015 / 17:38