Re: sigo con uploads
| From: | Ivan Rodriguez | Date: | Thu, 04 Mar 2004 13:51:34 +0000 |
| Subject: | Re: sigo con uploads | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-46235@lists.php.net to get a copy of this message | ||
Que va, lo que deberias hacer es controlar el formulario con javascriopt, es
decir, si seleccionas la opcion de fichero, que el resto se te desactiven, y
asi con el resto, y luego a la hora de procesarlo con PHP, mira el valor del
input radio y dependiendo del valor haces una cosa u otra, para eso son
estan las estructuras de control tales como switch :-)
----- Original Message -----
From: "Oscar Besga" <o.besga@ceb2b2000.com>
To: "_Php_Es" <php-es@lists.php.net>
Sent: Thursday, March 04, 2004 1:32 PM
Subject: [PHP-ES] sigo con uploads
> Sigo con los uploads.. tengo este form
>
>
> <form name="MainForm" enctype="multipart/form-data"
> action="addDocumentBL.php" method="POST" >
> <input type="radio" name="fTypeInsert" value="File">
> Fichero:
> <input type="file" name="fFile" >
> <input type="radio" name="fTypeInsert" value="Scan">
> Escaner:
> <imput type="text" name="fTextScan"">
> <input type="radio" name="fTypeInsert" value="Ftp"> FTP:
> <select name="fFtpFiles" id="fFtpFiles">
> <option
> value="kowgeldeTree.zpj">kowgeldeTree.zpj</option>
> <option value="control.php">control.php</option>
> <option value="index.html">index.html</option>
> <option value="language.inc">language.inc</option>
> </select>
> <b>Titulo</b><input type="text" name="fName"
> size="20">
> <input type="submit">
> </form>
>
> Al dar al boton submit, puesto que tiene un input file ¿ php intentará
> siempre realizar un UPLOAD, aunque haya seleccionado otra opcion ( se
> que es indpendiente una cosa de la otra ) y el input file esté vacio ?
>
> Supogno que la mejor solcuión sería hacer diferentes forms o realizar
> antes la selección que hace el radio
>
> Oskar
>
>
>
>
> / \
> / \
> / Oscar Besga Arcauz \
> --------------------------------
> \ o.besga@ceb2b2000.com /
> \ /
> \ /
>
>
>
> --
> PHP Spanish Localization Talk Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>