estaba haciendo un registro de recursos humanos y me funcionaba a la perfeccion... ahora bien ingrese solo 5 campos mas pero me da este error
Warning: Cannot modify header information - headers already sent by (output started at /home/indexa/public_html/latiendadelpintor/unete.php:15) in /home/indexa/public_html/latiendadelpintor/ficha_empleos.php on line 151
siendo la linea 151 esta
Código PHP:
header(sprintf("Location: %s", $insertGoTo));
Código PHP:
<?php require_once('Connections/pintor.php');
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "''";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "''";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "''";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "''";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$ediciondir= 'fotos/';
$uploaddir=$ediciondir;
if (!is_dir($ediciondir)) { mkdir($uploaddir, 0777); }
move_uploaded_file($_FILES['imagen']['tmp_name'], $uploaddir . $_FILES['imagen']['name']);
$filename = $_FILES['imagen']['name'];
$insertSQL = sprintf("INSERT INTO rrhh (id, nombres, apellidos, email, pais, estado, ciudad, urbanizacion, calle, casa, piso, telcasa, telcelular, nacionalidad, cedpas, numerodoc, fechanac, sexo, estadocivil, imagen, objetivos, cargo, relacion, tipotrabajo, sueldo, cambiociudad, desde, hasta, empresa, dir_empresa, cargo_empresa, jefe, cargo_jefe, terminacion, sueldo_final, desde2, hasta2, empresa2, dir_empresa2, cargo_empresa2, jefe2, cargo_jefe2, terminacion2, sueldo_final2, desde3, hasta3, empresa3, dir_empresa3, cargo_empresa3, jefe3, cargo_jefe3, terminacion3, sueldo_final3, instituto, dir_instituto, anos_cur, inicio_inst, final_inst, titulo, instituto2, dir_instituto2, anos_cur2, inicio_inst2, final_inst2, titulo2, instituto3, dir_instituto3, anos_cur3, inicio_cur3, final_cur3, titulo3, instituto4, dir_instituto4, anos_cur4, inicio_inst4, final_inst4, titulo4, instituto5, dir_instituto5, anos_cur5, inicio_inst5, final_inst5, titulo5, nomape, direccion_ref, tel_ref, tiempo_ref, nomape2, direccion_ref2, tel_ref2, tiempo_ref2, povehiculo, modelovehi, anovehi, licenpos, licengrado) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['id'], "int"),
GetSQLValueString($_POST['nombres'], "text"),
GetSQLValueString($_POST['apellidos'], "text"),
GetSQLValueString($_POST['email'], "text"),
GetSQLValueString($_POST['pais'], "text"),
GetSQLValueString($_POST['estado'], "text"),
GetSQLValueString($_POST['ciudad'], "text"),
GetSQLValueString($_POST['urbanizacion'], "text"),
GetSQLValueString($_POST['calle'], "text"),
GetSQLValueString($_POST['casa'], "text"),
GetSQLValueString($_POST['piso'], "text"),
GetSQLValueString($_POST['telcasa'], "text"),
GetSQLValueString($_POST['telcelular'], "text"),
GetSQLValueString($_POST['nacionalidad'], "text"),
GetSQLValueString($_POST['cedpas'], "text"),
GetSQLValueString($_POST['numerodoc'], "text"),
GetSQLValueString($_POST['fechanac'], "date"),
GetSQLValueString($_POST['sexo'], "text"),
GetSQLValueString($_POST['estadocivil'], "text"),
GetSQLValueString($filename, "text"),
GetSQLValueString($_POST['objetivos'], "text"),
GetSQLValueString($_POST['cargo'], "text"),
GetSQLValueString($_POST['relacion'], "text"),
GetSQLValueString($_POST['tipotrabajo'], "text"),
GetSQLValueString($_POST['sueldo'], "text"),
GetSQLValueString($_POST['cambiociudad'], "text"),
GetSQLValueString($_POST['desde'], "text"),
GetSQLValueString($_POST['hasta'], "text"),
GetSQLValueString($_POST['empresa'], "text"),
GetSQLValueString($_POST['dir_empresa'], "text"),
GetSQLValueString($_POST['cargo_empresa'], "text"),
GetSQLValueString($_POST['jefe'], "text"),
GetSQLValueString($_POST['cargo_jefe'], "text"),
GetSQLValueString($_POST['terminacion'], "text"),
GetSQLValueString($_POST['sueldo_final'], "text"),
GetSQLValueString($_POST['desde2'], "text"),
GetSQLValueString($_POST['hasta2'], "text"),
GetSQLValueString($_POST['empresa2'], "text"),
GetSQLValueString($_POST['dir_empresa2'], "text"),
GetSQLValueString($_POST['cargo_empresa2'], "text"),
GetSQLValueString($_POST['jefe2'], "text"),
GetSQLValueString($_POST['cargo_jefe2'], "text"),
GetSQLValueString($_POST['terminacion2'], "text"),
GetSQLValueString($_POST['sueldo_final2'], "text"),
GetSQLValueString($_POST['desde3'], "text"),
GetSQLValueString($_POST['hasta3'], "text"),
GetSQLValueString($_POST['empresa3'], "text"),
GetSQLValueString($_POST['dir_empresa3'], "text"),
GetSQLValueString($_POST['cargo_empresa3'], "text"),
GetSQLValueString($_POST['jefe3'], "text"),
GetSQLValueString($_POST['cargo_jefe3'], "text"),
GetSQLValueString($_POST['terminacion3'], "text"),
GetSQLValueString($_POST['sueldo_final3'], "text"),
GetSQLValueString($_POST['instituto'], "text"),
GetSQLValueString($_POST['dir_instituto'], "text"),