Ver Mensaje Individual
  #6 (permalink)  
Antiguo 23/09/2008, 14:18
Avatar de Carlojas
Carlojas
 
Fecha de Ingreso: junio-2007
Ubicación: Shikasta
Mensajes: 1.272
Antigüedad: 16 años, 10 meses
Puntos: 49
Respuesta: Importar archivo .txt a text area

Que tal pablosky13, tu problema radica en el método de envio de tu formulario que debe ser GET o POST, ya que el array superglobal REQUEST lo que hace es rescatar variables que sean enviadas por GET y POST. Variables Predefinidas. Ademas si tu página se autoprocesa debes indicarlo en el action del formulario prueba así tu código:
Código PHP:
<?php if($_POST['imp']) {  

$op $_POST['op']; 

switch (
$op) { 
    case 
"actualidad":   
$actua file_get_contents("actualidad.txt");  
$actua ucfirst($actua); 
$actua nl2br($actua); 
echo 
"listo!"
    break; 
        
    case 
"noticias":   
$noti file_get_contents("noticias.txt"); 
$noti ucfirst($noti); 
$noti nl2br($noti); 
echo 
"listo!"
    break;  

    case 
"deportes":   
$depo file_get_contents("deportes.txt"); 
$depo ucfirst($depo); 
$depo nl2br($depo); 
echo 
"listo!"
    break; 
       }     
     
    } 
?> 
// Metodo de envio post 
<form action="action="<?php $_SERVER['PHP_SELF'];?>" method="post">
Saludos.