I'm new to the programming area and would like some help I set up a page to insert dates into 4 fields and I need those dates to be stored in DB And I kind of do not know and I'm having trouble riding ... can anyone help me?
Another thing I need to show this date later on the same page ... and I do not know if I did it right ... is commented not to give an error on the page ..
Note: I set the pag in a ctp file and the pag function calls in a controller
function in controller:
public function desligamentocliente()
{
$this->set( "titulo_da_pagina", "Desligamento de Cliente");
$idCliente = ( isset( $this->request->params['pass'][0] ) ) ? $this->request->params['pass'][0] : 0;
//$this->verifica_ausencia_dados( $this->request->data['idCliente'] );
$this->loadModel( "DesligamentoCliente" );
$connect = mysql_connect('nome_do_servidor', 'nome_de_usuario', 'senha');
$db = mysql_select_db('nome_bo_banco_de_dados');
$query_select = "SELECT login FROM usuarios WHERE login = '$login'";
$dados = $this->DesligamentoCliente->find( "list", array( "conditions" => array(
"_esc_codigo" => $idCliente )));
/*if ($dados['Desligamentos']['id'] ='' ) {
echo "Data": $dados;
} else {
if ($dados['Desligamentos']['id'] == "" || $dados['Desligamentos']['id'] = null) {
echo "Data não cadastrada";
}
}*/
}
I thank you for the help