Ver Mensaje Individual
  #3 (permalink)  
Antiguo 02/05/2014, 15:19
Avatar de santicj
santicj
 
Fecha de Ingreso: mayo-2014
Mensajes: 2
Antigüedad: 10 años
Puntos: 0
Respuesta: Grupo de usuarios

¿Que parte del código? Esta variable es la que inserta la información en la tabla
Cita:
<?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;
}
}

$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 tblusuario (strName, strLastname, strEmail, strPassword, strDate, usr) VALUES (%s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['strName'], "text"),
GetSQLValueString($_POST['strLastname'], "text"),
GetSQLValueString($_POST['strEmail'], "text"),
GetSQLValueString($_POST['strPassword'], "text"),
GetSQLValueString($_POST['strDate'], "date"),
GetSQLValueString($_POST['usr'], "int"));

mysql_select_db($database_conknite, $conknite);
$Result1 = mysql_query($insertSQL, $conknite) or die(mysql_error());
}
?>
Y en una parte del registro, pido
Cita:
<input type="num" name="usr" value="" placeholder="N° de est" tabindex="1">
Aca me gustaría que al poner el número de usuarios, aparezca esa misma cantidad de casilleros y la persona pueda poner los nombres de cada uno

Decime si es otra cosa lo que me dijiste que me faltaba