Questions tagged as 'php'

1
answer

Call method by form action

Is it possible to call a method via post via the form's action? How? <?php class Produto { public function insere() { $nome = $_POST['nome']; $descricao = $_POST['descricao']; $preco = $_POST['preco']; $conexao = new Dat...
asked by 15.11.2016 / 16:53
3
answers

Pick up the week correctly

Colleagues, How would I get the week in a given month? For example, if the user next time to access the system (today is 11/18/16), it would appear:    Current week: 11/20/2016 to 11/27/2016 I accept suggestions in PHP, Jquery or Javas...
asked by 18.11.2016 / 14:44
1
answer

Maximum execution time of 30 seconds exceeded MPDF

When you run local, the PDF generates normally, but on the server it times out and does not open. <?php require_once "../mpdf60/mpdf.php"; require_once "../DAO/conexao.php"; require_once "../DAO/vendaDAO.php";...
asked by 21.11.2016 / 19:03
2
answers

Can you install ssl certificate on 2 or more servers?

Good morning, I have two web servers being a linux hosted on locaweb, which hosts the main site of the company, and the other windows hosted in azure, the latter being specific to asp.net applications. I have a wildcard certificate, which cov...
asked by 07.04.2017 / 13:42
1
answer

Send data to another page or send it to another page?

I would like to know if it is better, for example, to have a form where the action is set for another page, or if it is recommended to send the data to the page itself with action="<?php echo $_SERVER['PHP_SELF']?>" . If you have...
asked by 04.04.2017 / 20:04
1
answer

Picking up monthly items ELOQUENT MODEL

Well I need to make a query where I have to bring all the listed items of the month we are in. In query that I've done I'm bringing all with status co_de O : $vendas = Encomenda::where('FlgStEncomenda', 'O')->c...
asked by 11.11.2016 / 15:09
2
answers

CRUD with MVC and DAO in PHP

I'm starting with programming and I'm doing a CRUD with MVC and DAO. I would like to know if the form I'm doing is correct, what could be improved and how do I call the method of inserting the ProductController in the form. <?php class...
asked by 14.11.2016 / 19:03
1
answer

Php array check for values or keys

[TotalPed] => Array ( [VlrTotalIPI] => 0.00 [VlrTotalItens] => 652.68 [VlrTotalDesc] => 0.00 [VlrTotalPed] => 652.68 [PercComPed] => 0.00 [PercComPed2] => 0.00 [VlrF...
asked by 10.11.2016 / 01:54
1
answer

Instance declared in the variable that immediately afterwards receives a new value

I have the following code: $config = new \Skreth\System\Config(dirname(__DIR__) . '/config/config.ini'); $config = $config->getProperties(); I create an instance declared in the variable $config and then I give it a new value that...
asked by 16.08.2016 / 19:21
1
answer

How to add values in php? [duplicate]

Good morning, I want to add values to a form, but I can not. I need to do the following calculation: <?php vlMateriaPrima = 3,05; $isumosMateriais = 0,25; $embalagem = 0,50; $custoDireto = vlMateriaPrima + $isumosMateriais + $embalage...
asked by 13.09.2016 / 16:07