Ver Mensaje Individual
  #4 (permalink)  
Antiguo 04/03/2010, 14:14
kriss8725
 
Fecha de Ingreso: mayo-2009
Mensajes: 242
Antigüedad: 15 años, 10 meses
Puntos: 2
Pregunta Respuesta: exportar datos a un archivo de texto

perdon por la poca explicacion, miren genero numeros aleatorios, este e smi codigo:

Código PHP:
<!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&iacute;tulo</title>
</head>

<body>
 <form action="" autocomplete="off" method="post" name="form" >
  Lada: <input name="txtlada" type="text" /><br />
  Restriccion: <input name="txtrestriccion" type="text" /><br/>
  Cantida de numeros: <input name="txtcant" type="text" /><br/><br/>
  <input name="submitted" value="Generar" type="submit" />
 </form>

<?php
     
if($submitted){
      
$i=0;
      while(
$i $txtcant){
       
$i2=1;
       
$num="";
       
$numero1 $txtlada.$txtrestriccion;
       while(
$i2 5){
        
$aleatorio rand(0,9);   
        
$num $num.$aleatorio;
        
$i2++;
       }
       echo 
$numero1.$num;
       echo 
'<br />';
       
$i++;
      }
      
     }
?> 
 
</body>
</html>
y los numeros que genero los quiero poner dentro de un archivo de texto separados por comas, como puedo hacer eso.