Foros del Web » Programando para Internet » PHP »

Problemas pasar datos a formulario

Estas en el tema de Problemas pasar datos a formulario en el foro de PHP en Foros del Web. Hola bueno soy nuevo en esto estoy realizando una consulta por una clave primaria , pero al generar la consulta me arroja un problema de ...
  #1 (permalink)  
Antiguo 16/05/2011, 09:08
Avatar de evolutionrgm  
Fecha de Ingreso: mayo-2011
Mensajes: 108
Antigüedad: 13 años
Puntos: 5
Mensaje Problemas pasar datos a formulario

Hola bueno soy nuevo en esto estoy realizando una consulta por una clave primaria , pero al generar la consulta me arroja un problema de permisos esto se origina ya que estoy usando esta sentencia $_SERVER(['PHP_SELF']) .. entonces que otra alternativa podria aplicar para solucionar esto

adjunto les dejo el codigo para ver si me pueden aportar alguna idea desde ya agradecido

<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$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;
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License

Name : Yellowing
Description: A two-column, fixed-width design with dark color scheme.
Version : 1.0
Released : 20110123

-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Modificar Usuarios</title>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<style type="text/css">
<!--
.style1 {
color: #006666;
font-weight: bold;
}
.style3 {color: #006666; font-weight: bold; font-size: 14px; }
.style4 {color: #FFFFFF}
-->
</style>
</head>
<body>
<div id="wrapper">
<div id="header">
<div id="logo">
<h1><a href="#">INTRANET </a></h1>
<p>Corporación Municipal Quilpué</p>
</div>
<div id="search">
</div>
</div>
<!-- end #header -->
<div id="page">
<div id="page-bgtop">
<div id="page-bgbtm">
<div id="menu">
<ul>
<li></li>
<li></li>
</ul>
</div>
<!-- end #menu -->
<div id="content">
<div class="post">
<h2 class="title">Modifícar Usuario </h2>
<p class="meta"><img src="../icons/user_warning.png" width="128" height="128" alt="" class="alignleft border" /></p>
<div class="entry">
<p>&nbsp;</p>
</div>
</div>
<div class="post">
<form id="selecionador_rut" name="seleccionador_rut" method="get" action="<? $_(['PHP_SELF']);?>">
<label>RUT:
<input name="rut_buscar" type="text" id="rut_buscar" />
</label>
<label>
<input name="buscar" type="submit" id="buscar" value="Buscar" />
</label>
</form>
<form id="form1" method="post" action="<? $_SERVER(['PHP_SELF']);?>">
<label></label>
<table>
<tr valign="baseline">
<td align="right">Rut</td>
<td><label>
<input name="rut" type="text" disabled="disabled" id="rut" value="<? echo $rut; ?>" />
</label></td>
</tr>
<tr valign="baseline">
<td align="right">IdFicha::</td>
<td><label>
<input name="idficha" type="text" disabled="disabled" id="idficha" value="<? echo $idficha; ?>" />
</label></td>
</tr>
<tr valign="baseline">
<td align="right">Nom:</td>
<td><label>
<zx>
<input name="nombre" type="text" id="nombre" value="<? echo $nombre; ?>" />
</label></td>
</tr>
<tr valign="baseline">
<td align="right">Apellido1:</td>
<td><label>
<input name="apellido1" type="text" id="apellido1" value="<? echo $apellido1; ?>" />
</label></td>
</tr>
<tr valign="baseline">
<td align="right">Apellido2:</td>
<td><label>
<input name="apellido2" type="text" id="apellido2" value="<? echo $apellido2; ?>" />
</label></td>
</tr>
<tr valign="baseline">
<td align="right">Fechnac:</td>
<td><label>
<input name="fechnac" type="text" id="fechnac" value="<? echo $fechnac; ?>" />
</label></td>
</tr>
<tr valign="baseline">
<td align="right">Fono:</td>
<td><label>
<input name="fono" type="text" id="fono" value="<? echo $fono; ?>" />
</label></td>
</tr>
<tr valign="baseline">
<td align="right">Direccion:</td>
<td><label>
<input name="direccion" type="text" id="direccion" value="<? echo $direccion; ?>" />
</label></td>
</tr>
<tr valign="baseline">
<td align="right">Cargo:</td>
<td><label>
<input name="cargo" type="text" id="cargo" value="<? echo $cargo; ?>" />
</label></td>
</tr>
<tr valign="baseline">
<td align="right">Fech_ingreso:</td>
<td><label>
<input name="fech_ingreso" type="text" id="fech_ingreso" value="<? echo $fech_ingreso; ?>" />
</label></td>
</tr>
<tr valign="baseline">
<td align="right">&nbsp;</td>
<td><input name="actualizar_datos" type="submit" id="actualizar_datos" value="Actualizar Datos" /></td>
</tr>
</table>
</form>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2 class="title">&nbsp;</h2>
</div>
<div class="post">
<h2 class="title">&nbsp;</h2>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #content -->
<div id="sidebar">
<ul>
<li>
<h2>Menu de Opciones</h2>
<p class="style1">Recursos Humanos</p>
</li>
<li>
<ul>
<li><a href="#">Solicitud de Día Administrativo</a></li>
<li><a href="#">Solicitud de Vacaciones</a></li>
<li><a href="#">Certificado de Antiguedad</a></li>
<li><a href="#">Copia Liquidación de Sueldo</a></li>
</ul>
</li>
<li>
<h2 align="left"><span class="style3">Sistemas</span></h2>
<ul>
<li><a href="#">Cambiar Clave</a></li>
<li>Desconectar </li>
<li><a href="administrador.php">Volver Página Principal</a></li>
</ul>
</li>
<li>
<h2 align="left"><span class="style3">Opciones Adicionales</span></h2>
<ul>
<li><a href="../secretaria/ingresar_noticias.php">Ingreso de Noticias </a></li>
<li>Modificacion de Noticia</li>
<li>Eliminar Noticia</li>
<li>Ingreso de Calendario</li>
<li><a href="ingresar_usuario.php">Ingreso de Usuario</a></li>
<li>Modificación de Ususario</li>
<li>Eliminar Usuario </li>
</ul>
<h2>&nbsp;</h2>
</li>
</ul>
</div>
<!-- end #sidebar -->
<div style="clear: both;">&nbsp;</div>
</div>
</div>
</div>
<!-- end #page -->
</div>
<div id="footer-wrapper">
<div id="footer">
<p class="style4">Copyright (c) 2010 www.cmq.cl derechos reservados. Diseñado y Creado por el dpto de Informática</p>
</div>
</div>
<!-- end #footer -->
</body>
</html>
<?php
mysql_free_result($actualizar_user);
?>

Etiquetas: pasar, formulario
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 22:18.