Foros del Web » Programando para Internet » PHP »

Grupo de usuarios

Estas en el tema de Grupo de usuarios en el foro de PHP en Foros del Web. Hola a todos! Estoy creando una página, y necesito que una persona al registrarse cree un grupo, pero que durante el formulario detalle cuantos son ...
  #1 (permalink)  
Antiguo 02/05/2014, 14:31
Avatar de santicj  
Fecha de Ingreso: mayo-2014
Mensajes: 2
Antigüedad: 9 años, 11 meses
Puntos: 0
Pregunta Grupo de usuarios

Hola a todos! Estoy creando una página, y necesito que una persona al registrarse cree un grupo, pero que durante el formulario detalle cuantos son los integrantes. No es necesario que haya alguna conección entre los distintos grupos, pero si poder limitar la cantidad de usuarios. Gracias!

pd: trabajo con mysql y php en dreamweaver, tengo una noción de como usar jquery
  #2 (permalink)  
Antiguo 02/05/2014, 14:37
Avatar de hhs
hhs
Colaborador
 
Fecha de Ingreso: junio-2013
Ubicación: México
Mensajes: 2.995
Antigüedad: 10 años, 9 meses
Puntos: 379
Respuesta: Grupo de usuarios

Te falta lo mas importante el código!!, sin el no te van a poder orientar
__________________
Saludos
About me
Laraveles
A class should have only one reason to change.
  #3 (permalink)  
Antiguo 02/05/2014, 15:19
Avatar de santicj  
Fecha de Ingreso: mayo-2014
Mensajes: 2
Antigüedad: 9 años, 11 meses
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

Etiquetas: formulario, grupo, mysql, usuarios
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 14:20.