Foros del Web » Programando para Internet » PHP »

lista menu mysql php

Estas en el tema de lista menu mysql php en el foro de PHP en Foros del Web. hola queridos foristas necesito insertar una lista menu multiple pero no e logrado hacerlo.... me consegui el siguiente codigo pero no veo en donde se ...
  #1 (permalink)  
Antiguo 03/07/2012, 14:37
 
Fecha de Ingreso: abril-2012
Mensajes: 58
Antigüedad: 12 años
Puntos: 0
lista menu mysql php

hola queridos foristas necesito insertar una lista menu multiple pero no e logrado hacerlo.... me consegui el siguiente codigo pero no veo en donde se selecciona la base de datos el usuario y password ni nada.. por favor me podrian colaborar Muchisimas graciass

<?
// if there is post data process it
if(!empty($_POST['mySelect']))
{
// extract the array of list choices from the post data
$mySelect = $_POST['mySelect'];

$numChoices = count($mySelect);
$insertVal = "";

for($i = 0; $i < $numChoices; $i++)
{
// concatenate each array value to one string variable
$insertVal .= $mySelect[$i];

// put a comma after all but the last value
if($i != $numChoices - 1)
{
$insertVal .= ",";
}
}
echo $insertVal;
}
// otherwise show the form
else
{
?>
<form action="<? $PHP_SELF ?>" method="post">
<select name="mySelect[]" multiple="multiple">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
<br /><br />
<input type="submit" />
</form>
<?}?>
  #2 (permalink)  
Antiguo 03/07/2012, 15:13
Avatar de maycolalvarez
Colaborador
 
Fecha de Ingreso: julio-2008
Ubicación: Caracas
Mensajes: 12.120
Antigüedad: 15 años, 9 meses
Puntos: 1532
Respuesta: lista menu mysql php

Utilice la herramienta highlight del foro para mostrar código.

en ése código no se usa MySQL, revíselo bien y explique ¿que es lo que quiere lograr?
__________________
¡Por favor!: usa el highlight para mostrar código
El que busca, encuentra...

Etiquetas: lista, mysql, variables, 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 02:04.