-2
I’m new to programming and I’d like some help I set up a page to insert dates in 4 fields and need these dates to be stored in DB And I kind of don’t know and I’m having a hard time putting it together...?
Another thing I need to show this date later on the same page...and I don’t know if I did it right.....
Note: I mounted the pag on an Arq ctp and the pag function calls on a controller
function in the 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 appreciate your help/
Start well don’t use the mysql_x functions, use mysqli_x or Pdo. Where the Insert?
– rray