Código PHP:
if ($opcion == "imagenanadir")
{
print "<TD VALIGN=TOP ALIGN=CENTER WIDTH=100%>
<form action=\"index.php?opcion=cuantas\" method=\"post\">
<table cellspacing=0 cellpadding=0 border=0 width=500>
<tbody>
<tr>
<td valign=top align=center><font size=2 face=verdana color=#454545>Cuantas imagenes deseas subir:</font></td>
</tr></tbody></table><br>
<table cellspacing=0 cellpadding=0 border=0 width=250 align=center>
<tbody>
<tr>
<input type=\"hidden\" name=\"central\" value=\"$central\">
<input type=\"hidden\" name=\"vercode\" value=\"$vercode\">
<td valign=top align=right><input type=\"text\" name=\"cuantas\" size=\"25\"></td>
<td valign=top align=left> <input type=\"submit\" value=\"Enviar\"></td>
</tr></tbody></table>
</form>
</TD>";
}
if ($opcion == "cuantas")
{
print "<TD VALIGN=TOP ALIGN=CENTER WIDTH=100%>
<table cellspacing=0 cellpadding=0 border=0 width=500>
<tbody>
<tr>
<td valign=top bgcolor=#66CCCC align=center><font size=2 face=verdana color=#FFFFFF><b>Subiendo Imagenes:</b></font></td>
</tr></tbody></table><br>
<form enctype=\"multipart/form-data\" action=\"index.php?opcion=subiendo\" method=\"post\">
<table cellspacing=0 cellpadding=0 border=0 width=500 align=center>
<tbody>";
for ($g=0; $g<$cuantas; $g++)
{
print "<tr>\r<td valign=top align=center><input type=\"file\" name=\"imagen$g\" size=\"34\"></td>";
}
print "\r<input type=\"hidden\" name=\"central\" value=\"$central\">
<input type=\"hidden\" name=\"vercode\" value=\"$vercode\">
<input type=\"hidden\" name=\"cuantas\" value=\"$cuantas\">
</tr></tbody></table><br>
<table cellspacing=0 cellpadding=0 border=0 width=500>
<tbody>
<tr>
<td valign=top align=center><input type=\"submit\" value=\"Enviar\"></td>
</tr></tbody></table>
</form>
</TD>";
}
if ($opcion == "subiendo")
{
for ($gg=0; $gg<$cuantas; $gg++)
{
$imagen = "imagen$gg";
$imagen = ${$imagen};
if ($imagen[$gg] != "")
{
$nombre = "imagen".$gg."_name";
$nombre = ${$nombre};
$fp = fopen ("../$central/fileimagenes/$vercode.txt","w");
fwrite($fp, $nombre);
fclose($fp);
$imagen_destino = ("../$central/fileimagenes/".$nombre);
copy("$imagen", "$imagen_destino");
}
}
print "subi las imagenes xD";
}
el bendito problema
![censurado](http://static.forosdelweb.com/fdwtheme/images/smilies/sho.png)
![Afirmando](http://static.forosdelweb.com/fdwtheme/images/smilies/afirmar.gif)
saLudOs
![Aplauso](http://static.forosdelweb.com/fdwtheme/images/smilies/aplausos.gif)