<?php
//Checamos las variables que nos mandan de la forma de emp_altas.php
$nombre=$http_post_vars['emp_name'];
$ap=$http_post_vars['emp_name'];
$email=$http_post_vars['emp_name'];
$tel=$http_post_vars['emp_tel1'];
$hire_date=$http_post_vars['emp_hire'];
$puesto=$http_post_vars['job_title'];
$salario=$http_post_vars['emp_sal'];
$jefe=$http_post_vars['manager_id'];
$dep=$http_post_vars['department_id'];
$region=$http_post_vars['region'];
if($region=='America')
{
$reg=0;
}
else
{
$reg=1;
}
//preparamos la coneccion
$conec=odbc_connect('occidente','proyecto','rgsb');
if(!$conec)
{
echo"Error al conectarse";
}
if($region==0)
{
$resultado=odbc_exec($conec,"{CALL proc_insertaempocci(".$nombre.",".$ap.",".$email.",".$tel.",".$hire_date.",".$puesto.",".$salario.",".$jefe.",".$dep.")}" );
}
else
{
$resultado=odbc_exec($conec,"{CALL proc_insertaempori(".$nombre.",".$ap.",".$email.",".$tel.",".$hire_date.",".$puesto.",".$salario.",".$jefe.",".$dep.")}" );
}
?>