
17/04/2013, 17:52
|
| | Fecha de Ingreso: abril-2013
Mensajes: 53
Antigüedad: 11 años, 11 meses Puntos: 0 | |
Respuesta: Enviar datos formulario a un array[] oki MUCHAS GRACIAS , dejo el código correcto por si alguien tiene la misma duda :
formulario:
<!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>Documento sin título</title>
</head>
<body>
<form action="MyScript.php" method="post">
<input type="text" name="valores"> <br>
<input type="submit">
</form>
</body>
</html>
y recibir variables y dividir por espacio array:
<?php
// Obtenemos la variable del formulario:
$valor = $_POST['valores'];
$result = explode(" " ,$valor);
echo $result[0];//muestra la posicion 0 del array
?>
saludos :) |