I'm learning to use POO
I'd like to ask for help because I can not enter $_POST
inside a variable, I've already researched and looked at my books, but I'm not getting any progress. I am grateful for the help in learning this in the right way.
<?php
if (isset($_POST['enviarFrech'])) {
$fech = $_POST['st'];
$data_atual = date("Y-m-d");
print_r($fech);
echo $data_atual;
class DadosMontagem {
public $lojamont;
public $monta;
public function set_lojamontador($l) {
$this->$lojamont = $l;
}
public function lsmt() {
echo $l;
}
}
$ls_mt = new DadosMontagem($_POST['lojamontar']);
$ls_mt->set_lojamontador();
$ls_mt->lsmt();
fechamentoMontador($conexao, $fech, $ls, $mt, $data_atual);
}
?>