Questions tagged as 'php'

2
answers

Popular input with data from the same table via dropdown

I have a select that pulls the name of a product. I want you to select the product name via dropdown and automatically fill in an input with product code. The information is in a single table, in the id, id_produto, nome ,serial, log...
asked by 08.09.2014 / 20:21
1
answer

How to save data coming from the facebook SDK login in the database?

I'm using facebook api for login , and following the tutorial I have already been able to implement it, but I still do not understand how the system that picks up user information works. What I need to do is store this information in the dat...
asked by 03.08.2015 / 21:45
1
answer

Check if a value is present in an array

I have a table in my database with multiple numbers. I get the numbers from the database, I save in array , and I make echo in a table in PHP: echo "<table class='CSSTableGenerator'>"; echo "<tr>"; echo "<th>ar...
asked by 08.08.2015 / 17:28
1
answer

Error in JSON with accents

I'm having problems with my JSON , the error is accentuation, does JSON allow? if it allows, how can I do to show, what will get JSON needs it to be normal, with accents and everything .. MY JSON: { "id": "addCTE",...
asked by 12.08.2015 / 20:17
1
answer

How to save in a database, clashes between teams?

I would like to know how to save in a table in the database clashes between teams, for example: TIME A x TIME B TIME A x TIME C TIME B x TIME C     
asked by 29.07.2015 / 19:11
1
answer

Calling PHP function for BAT file

I need to create a BAT file that should be executed every day on 25th. It should run a function named emailAnnountables (), which has been defined for programming a website within two files (controller and model). Since I took over this websi...
asked by 05.08.2015 / 14:24
2
answers

How do I subtract arrays

array_intersect_ukey($result1, $result2, 'key_compare_func2') // primeiro array array_intersect_ukey($result2, $result1, 'key_compare_func2') // segundo array Result: Array ( [bife] => 3 ) Array ( [bife] => 2 ) Desired: Ar...
asked by 17.09.2014 / 03:52
1
answer

PHP's ZipArchive function does not work with more than one file

The code is as follows: $zip = new ZipArchive(); $criou = $zip->open("download.zip", ZipArchive::CREATE); if ($criou === true){ $diretorio = UPLOAD_DIR . 'produto/small/'; foreach ($imagens as $imagem) { $zip->addFile($...
asked by 17.09.2014 / 21:21
1
answer

Select a Mysql table inside a PHP file without refresh

Select Mysql database data inside a PHP file without refresh. Example: <?php // Essa select abaixo tem que buscar a cada 5 segundos sem atualizar a página $selecionaTabela = mysql_query("SELECT * FROM nomeTabela")or die(mysql_error()); /...
asked by 10.06.2014 / 16:07
1
answer

Format Unix Time to display only Data

Good afternoon, I'm having a problem where I need to remove the time or set the end time always to 23:59:59 if($form) { $start = new \DateTime($form['startDate']); $start = $start->format('U'); $end = new \DateT...
asked by 10.06.2014 / 20:38