Questions tagged as 'php'

1
answer

Private functions via ajax - Code Igniter

I'm using CodeIgniter to create a web system and so the user does not refresh the page by missing it already I use all ajax calls inside "modules". The problem is that if I put a function in a controller as public the user can kick the URL and a...
asked by 05.01.2015 / 16:52
1
answer

MySQL and PHP clustering

I need to group a query with a detail, grouping should be done only when the information is repeated in sequence, for example: id nome 1 lucas 2 lucas 3 marcos 4 lucas 5 marcos In the example above, only the "lu...
asked by 12.01.2018 / 16:56
1
answer

How to consume validation function?

For teaching reasons, I created a function in php to validate 3 fields, the function is in the file validate.php : <?php /** * Created by PhpStorm. * User: Jorge * Date: 01/06/2018 * Time: 10:40 */ function valida($nome,...
asked by 01.06.2018 / 16:37
1
answer

How to insert the loaded button into the database

In my code I have 3 buttons, which serve for the user to sort the service: <input type="submit" name="verde" class="verde" value=""> <input type="submit" name="amarelo" class="amarelo" value=""> <input type="submit" name="vermel...
asked by 05.06.2018 / 14:02
1
answer

Keep information in date format with PHP?

I have the following information in a file .xls 12/12/2017 10:34:03 but when I show in the browser with PHP it appears like 43081.4403125 . do you have any way to keep in date format ? I'm using the PHPExcel library to get t...
asked by 15.12.2017 / 20:05
1
answer

.csv export with row complement based on a fixed number

I have a MySQL table of products. I need to create a .csv export of them. The products are on the bench as follows: cod produto valor pagina 123 caderno 1,00 1 456 lápis 1,00 1 789 borracha 1,00 1 112...
asked by 18.12.2017 / 20:15
1
answer

How to get data from a Select MySQLi and send newsletter

I'm trying to send a newsletter after a search in my database, it's the first time I'm using the MySQLi extension and I'm having some difficulty in going through the second WHILE and I think it's not in the right way, I did like this: $mysql...
asked by 16.02.2015 / 18:42
1
answer

Convert text links into html link

I saw the solution here Convert a link from text in a href link and several others and I ended up adapting to my need, but there are some problems. I need to convert the links and the links from image to image and hyperlink I'm doing the fo...
asked by 18.03.2015 / 01:57
1
answer

What is a javascript Override?

I'm working on a project where I have to do 'parser' of a remote site to change various contents of it, everything is right except the functions that involve javascript/ajax. The functions do not work, the 'parseado' site al...
asked by 20.03.2015 / 17:45
1
answer

Controllers need to be classes?

When developing a system using MVC from scratch, does each controller need to be a class or can I simply use a file containing some functions that will be called according to the action sent by View? Example, I have a controler for the "profi...
asked by 20.03.2015 / 18:06