Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/04/2008, 23:02
sammaeliv
 
Fecha de Ingreso: agosto-2005
Mensajes: 12
Antigüedad: 18 años, 8 meses
Puntos: 0
Ayuda Urgente :) Porfavor!

NOSE SI ES EL LUGAR INDICADO PARA PONER ESTE MENSAJE PERO COMO NO ALCANCE A VER SUBFOROS RELACIONADOS CON ESTE LO PUSE AQUI MISMO

TENGO EL SIGUIENTE "PROBLEMA" QUE SEGUN TENGO ENTENDIDO ES FACIL DE HACER CON JAVASCRIPT PERO HASTA AHORA NOSE COMO HACERLO

TENGO UN FORMULARIO CON 2 TEXTFIELDS, UNO DE CURP Y OTRO DEL NOMBRE DEL ASIPIRANTE A ENTRAR A UN SISTEMA "X"

<?php require_once('Connections/cn3.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;
}
}

$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 aspiran (CURP, NOM_ASP) VALUES (%s, %s)",
GetSQLValueString($_POST['CURP'], "text"),
GetSQLValueString($_POST['NOM_ASP'], "text"));

mysql_select_db($database_cn3, $cn3);
$Result1 = mysql_query($insertSQL, $cn3) or die(mysql_error());
}
?><!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>Untitled Document</title>
</head>

<body>
<form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
<table align="center">
<tr valign="baseline">
<td nowrap="nowrap" align="right">CURP:</td>
<td><input type="text" name="CURP" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">NOMBRE:</td>
<td><input type="text" name="NOM_ASP" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">&nbsp;</td>
<td><input type="submit" value="Insert record" /></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1" />
</form>
<p>&nbsp;</p>
</body>
</html>

EL PROBLEMA O AYUDA ES QUE NECESITO QUE EN VEZ DE SER UN SOLO TEXTFIELD EN EL NOMBRE DEL ASPIRANTE "NOM_ASP" SEAN 3 POR EJEMPLO: UNO PARA EL APELLIDO PATERNO, OTRO PARA EL MATERNO Y OTRO PARA EL NOMBRE Y AL MOMENTO DE ENVIARLO LOS JUNTE PARA QUE VAYAN EN UN SOLO CAMPO NOSE SI ME EXPLIQUE

ESPERO ME PUEDAN AYUDAR

Última edición por sammaeliv; 06/04/2008 a las 23:07