Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/10/2014, 12:39
dario58x
 
Fecha de Ingreso: octubre-2014
Ubicación: mendoza
Mensajes: 12
Antigüedad: 9 años, 6 meses
Puntos: 0
Exclamación wampserver no toma php en localhost problemas en php y mysql con dreamweaver

tengo problemas en mi servidor local usando wampserver no me abre el index.php para mas info paso el codigo q tengo echo del index


[PHP]<?php virtual('/1/Connections/rrhh1.php'); ?>
<?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 . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

$currentPage = $_SERVER["PHP_SELF"];

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO curriculum (nombre, apellido, nac, dni, direccion, codigo, telefono, mail, estudios, cursos, movilidad, empresa, puesto, años, tarea, referencias, observaciones) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['nombre'], "text"),
GetSQLValueString($_POST['apellido'], "text"),
GetSQLValueString($_POST['nac'], "text"),
GetSQLValueString($_POST['dni'], "text"),
GetSQLValueString($_POST['direccion'], "text"),
GetSQLValueString($_POST['codigo'], "text"),
GetSQLValueString($_POST['telefono'], "text"),
GetSQLValueString($_POST['mail'], "text"),
GetSQLValueString($_POST['estudios'], "text"),
GetSQLValueString($_POST['cursos'], "text"),
GetSQLValueString($_POST['movilidad'], "text"),
GetSQLValueString($_POST['empresa'], "text"),
GetSQLValueString($_POST['puesto'], "text"),
GetSQLValueString($_POST['aos'], "text"),
GetSQLValueString($_POST['tarea'], "text"),
GetSQLValueString($_POST['referencias'], "text"),
GetSQLValueString($_POST['observaciones'], "text"));

mysql_select_db($database_rrhh1, $rrhh1);
$Result1 = mysql_query($insertSQL, $rrhh1) or die(mysql_error());

$insertGoTo = "/1/ingreso_exitoso.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}

$maxRows_consulta = 10;
$pageNum_consulta = 0;
if (isset($_GET['pageNum_consulta'])) {
$pageNum_consulta = $_GET['pageNum_consulta'];
}
$startRow_consulta = $pageNum_consulta * $maxRows_consulta;

mysql_select_db($database_rrhh1, $rrhh1);
$query_consulta = "SELECT * FROM curriculum";
$query_limit_consulta = sprintf("%s LIMIT %d, %d", $query_consulta, $startRow_consulta, $maxRows_consulta);
$consulta = mysql_query($query_limit_consulta, $rrhh1) or die(mysql_error());
$row_consulta = mysql_fetch_assoc($consulta);

if (isset($_GET['totalRows_consulta'])) {
$totalRows_consulta = $_GET['totalRows_consulta'];
} else {
$all_consulta = mysql_query($query_consulta);
$totalRows_consulta = mysql_num_rows($all_consulta);
}
$totalPages_consulta = ceil($totalRows_consulta/$maxRows_consulta)-1;

$queryString_consulta = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_consulta") == false &&
stristr($param, "totalRows_consulta") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_consulta = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_consulta = sprintf("&totalRows_consulta=%d%s", $totalRows_consulta, $queryString_consulta);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>

<body>
<table border="1">
<tr>
<td width="149"><div align="center"><strong>ID</strong></div></td>
<td width="114"><div align="center"><strong>Nombre</strong></div></td>
<td width="115"><div align="center"><strong>Apellido</strong></div></td>
<td width="89"><div align="center"><strong>Fecha de nacimiento</strong></div></td>
<td width="86"><div align="center"><strong>Dni</strong></div></td>
<td width="123"><div align="center"><strong>Direccion</strong></div></td>
<td width="109"><div align="center"><strong>Codigo Postal</strong></div></td>
<td width="116"><div align="center"><strong>Telefono</strong></div></td>
<td width="92"><div align="center"><strong>Mail</strong></div></td>
<td width="117"><div align="center"><strong>Estudios</strong></div></td>
<td width="107"><div align="center"><strong>Cursos</strong></div></td>
<td width="126"><div align="center"><strong>Movilidad</strong></div></td>
<td width="119"><div align="center"><strong>Empresa</strong></div></td>
<td width="108"><div align="center"><strong>Puesto</strong></div></td>
<td width="28"><div align="center"><strong>Años</strong></div></td>
<td width="98"><div align="center"><strong>Tarea</strong></div></td>
<td width="133"><div align="center"><strong>Referencias</strong></div></td>
<td width="180"><div align="center"><strong>Observaciones</strong></div></td>
<td colspan="2"><div align="center"><strong>Operaciones</strong></div></td>
</tr>
<?php do { ?>
<tr>
<td><div align="center"><strong><?php echo $row_consulta['id_curriculum']; ?></strong></div></td>
<td><div align="center"><strong><?php echo $row_consulta['nombre']; ?></strong></div></td>
<td><div align="center"><strong><?php echo $row_consulta['apellido']; ?></strong></div></td>
<td><div align="center"><strong><?php echo $row_consulta['nac']; ?></strong></div></td>
<td><div align="center"><strong><?php echo $row_consulta['dni']; ?></strong></div></td>
<td><div align="center"><strong><?php echo $row_consulta['direccion']; ?></strong></div></td>
<td><div align="center"><strong><?php echo $row_consulta['codigo']; ?></strong></div></td>
<td><div align="center"><strong><?php echo $row_consulta['telefono']; ?></strong></div></td>
<td><div align="center"><strong><?php echo $row_consulta['mail']; ?></strong></div></td>
<td><div align="center"><strong><?php echo $row_consulta['estudios']; ?></strong></div></td>
<td><div align="center"><strong><?php echo $row_consulta['cursos']; ?></strong></div></td>
<td><div align="center"><strong><?php echo $row_consulta['movilidad']; ?></strong></div></td>
<td><div align="center"><strong><?php echo $row_consulta['empresa']; ?></strong></div></td>
<td><div align="center"><strong><?php echo $row_consulta['puesto']; ?></strong></div></td>
<td><div align="center"><strong><?php echo $row_consulta['años']; ?></strong></div></td>
<td><div align="center"><strong><?php echo $row_consulta['tarea']; ?></strong></div></td>
<td><div align="center"><strong><?php echo $row_consulta['referencias']; ?></strong></div></td>
<td><div align="center"><strong><?php echo $row_consulta['observaciones']; ?></strong></div></td>
<td><div align="center"><strong><a href="modificar.php?id_curriculum=<?php echo $row_consulta['id_curriculum']; ?>">Modificar</a></strong></div></td>
<td><div align="center"><a href="borrar.php?Id_curriculum=<?php echo $row_consulta['id_curriculum']; ?>">Eliminar</a></div></td>
</tr>
<?php } while ($row_consulta = mysql_fetch_assoc($consulta)); ?>
</table>
<p>&nbsp;
<div align="center">
<table border="0">
<tr>
<td><?php if ($pageNum_consulta > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_consulta=%d%s", $currentPage, 0, $queryString_consulta); ?>">Primero</a>
<?php } // Show if not first page ?></td>
<td><?php if ($pageNum_consulta > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_consulta=%d%s", $currentPage, max(0, $pageNum_consulta - 1), $queryString_consulta); ?>">Anterior</a>
<?php } // Show if not first page ?></td>
<td><?php if ($pageNum_consulta < $totalPages_consulta) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_consulta=%d%s", $currentPage, min($totalPages_consulta, $pageNum_consulta + 1), $queryString_consulta); ?>">Siguiente</a>
<?php } // Show if not last page ?></td>
<td><?php if ($pageNum_consulta < $totalPages_consulta) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_consulta=%d%s", $currentPage, $totalPages_consulta, $queryString_consulta); ?>">&Uacute;ltimo</a>


si alguien me puede ayudar se los voy a agradecer