Questions tagged as 'php'

2
answers

Is it possible to define a class within an array in earlier versions of PHP 7?

Is it possible? If yes, how? In PHP 7 it is possible to create anonymous classes, which have the possibility of being defined in any variable / property, but I do not know if it is possible to do this in previous versions, because I am not very...
asked by 05.08.2016 / 02:47
5
answers

How to protect PHP code from theft and piracy after deploy? [duplicate]

Well, I'm working on a system SaaP (PHP / CodeIgniter + MySQL). Initially the idea would be to deploy the deploy system to the client's choice hosting. The entire "setup" process would be performed by my team, so it would not have direc...
asked by 30.01.2014 / 14:22
5
answers

Store arithmetic operator in variable

I have the following code: $value1 = 10; $value2 = $value1 + 10; // $value2 == 20 I need the + operator to be variable, ie in my case I need to be + or - . I've tried the obvious but it sure would not work, here's the...
asked by 13.11.2015 / 14:34
5
answers

Remove part of a string

I have a string, example: 32137hyb8bhbhu837218nhbuhuh&3298j19j2n39 I want to remove (clean) from the string everything that comes after & . Please, how to do this?     
asked by 26.01.2017 / 05:23
4
answers

How to get information from the client's operating system?

I need to get information from the operating system of the person who accessed the page, for example through a command to find out if it is Windows, MAC, Linux.     
asked by 07.08.2017 / 23:05
2
answers

Is it possible to apply push technology?

I have a system, in which it displays database files, in list form. I query the database every 5 seconds to see if there are new files, and if it has it shown to the user, using AJAX. Why this? To avoid updating the page at all times, to s...
asked by 08.09.2014 / 20:57
3
answers

Add Array from multiple fields

I have a form with several fields containing currency values as I can add all these values in the post output Example form <form id="form2" name="form2" action="includes/acao.php?form=faturamento" method="post" > <input type='hi...
asked by 20.10.2015 / 17:20
1
answer

Tie duplicating whole table

I can not make a loop in the table, it is looping every search in the database. $dbc = mysqli_connect('senha_adm'); $query = "select carro, barco, aviao, moto, triciclo, velotrou, dataCadastro from agencia"; $result = mysqli_query(...
asked by 01.09.2016 / 16:46
3
answers

How to send a data to another PHP page by URL?

I know there are GET and POST methods but I do not know how to apply them. I have a page called index.php and I have several divs that are generated in a while. When I click on a div I'm redirected to a test.php page .. how do I apply the dat...
asked by 03.01.2016 / 10:59
2
answers

Print two arrays side by side

How to join two arrays with the index of array 1 following the index of array 2 . Join data: descricao array1= datacol1, datacol2, datacol3, datacol4 array2= collinha1, collinha2, collinha3 ,collinha4 Print like this:...
asked by 24.01.2016 / 22:45