ok si lo haces en un mismo script prueba asi
Código PHP:
Ver original<?php
if (isset($_GET['accion']) && $_GET['accion'] == "Redimensionar") {
$imagen = $_GET['imagen'];
$ancho = $_GET['ancho'];
$alto = $_GET['alto'];
{
?>
<center><img src = "<?=$imagen?>" width = "<?=$ancho?>" height = "<?=$alto?>" /></center>
<?php
}
else if(! isset($imagen)) {
echo '<script>alert("No ingreso URL");</script>';
}
}else{ $imagen="";}
?>
<form name = "FormularioRedimencionImagenURL" onSubmit = "return valida_formulario()" action = "" method = "GET">
<table>
<tbody>
<tr>
<td align = "right">URL imagen:
<input type = "text" maxlength = "160" size = "15" name = "imagen" id = "URL" value="<?php echo $imagen;?>">
</td>
</tr>
<tr>
<td align = "right">Ancho:
<input type = "text" maxlength = "4" size = "15" name = "ancho" id = "Ancho">
</td>
</tr>
<tr>
<td align = "right">Alto:
<input type = "text" maxlength = "4" size = "15" name = "alto" id = "Alto">
</td>
</tr>
<tr>
<td align = "right">
<input type = "submit" name = "accion" value = "Redimensionar">
<input type = "reset" name = "accion" value = "Borrar">
</td>
</tr>
</tbody>
</table>
</form>