Questions tagged as 'php'

2
answers

Determine article rank based on views of all articles

The idea is to determine the reputation of a given article based on views of all existing articles. An article can have a reputation of 1 to 5 stars, and it is constantly changing based on the views registered for all articles. The goal is...
asked by 02.12.2014 / 19:54
1
answer

Error making multiple insert

I have a form that generates multiple fields for adding data, and then sends all data using for , thus making multiple insert in MYSQL. However, I have a problem. Let's say I generate 30 forms, of this total is only sending 20, a...
asked by 26.07.2015 / 19:07
1
answer

How to put a string at the end of all URLs via PHP (CodeIgniter)

I'm using the CodeIgniter framework to develop a system. But in the company where they are using, the pages are not updating right, it's like the cache gives the whole page and only when I give an F5 it updates. For example, there is a screen...
asked by 23.07.2015 / 18:15
1
answer

Uploading large or compressed files?

I have a problem uploading files to the server for large files, and an idea was to send some of them in a way that is compressed .zip . Is there any problem in leaving open the upload part for the user to be able to send files of this...
asked by 20.07.2015 / 15:31
1
answer

How to avoid collision of upload file names

I'm making a site for uploading images, but when I upload two files with equal names, what I had before adds to the files directory . This is the code I use for upload : if(empty($_FILES)){ echo "<center><h1>Please, select the...
asked by 27.07.2015 / 05:14
1
answer

Problems sorting an array

I have an array of objects: $arrayTeste[] = array( "horario" =>$arr[$i]['horario'], "valor" =>$valorSoma, "nome" =>$arr[$i]['nome'] ); The time was all messed up, so I had to sort using the sort () function. sort($arr...
asked by 27.07.2015 / 23:39
1
answer

Login with facebook api does not return user email

Greetings galera, I spent hours and hours researching some solution to this problem, including here on the site, but I did not find anything that would help me. I'm implementing a facebook site registration using facebook's api directly. I...
asked by 29.07.2015 / 05:00
2
answers

Error trying to use isset in JavaScript

I do not know what's wrong with this JavaScript code: if( (isset(n1)) && (isset(n2)) ){ document.getElementById('resultado').innerHTML = n1 + n2; } I think I'm mixing PHP with JS. How can I resolve this?     
asked by 20.09.2015 / 03:25
1
answer

How to organize arrays

In the Pear documentation, it defines a pattern for how to assemble the structure of an array : $some_array = array( 'foo' => 'bar', 'spam' => 'ham', ); In this way, I already use, it separates legibly the elements, but wha...
asked by 25.09.2015 / 22:35
1
answer

Export table to file using PHP

I would like to know if it is possible for me to export a table from the mysql database in PHP so that I can save the script to create this table in a variable. Same as PHPmyadmin, export the table to an sql file.     
asked by 25.09.2015 / 02:48