Código PHP:
<?php
if (isset($_GET['accion']) && $_GET['accion'] == "Redimensionar")
{
$imagen = $_GET['imagen'];
$ancho = $_GET['ancho'];
$alto = $_GET['alto'];
if(isset($imagen))
{
?>
<center><img src = "<?=$imagen?>" width = "<?=$ancho?>" height = "<?=$alto?>" /></center>
<?php
}
else if(! isset($imagen))
{
echo '<script>alert("No ingreso URL");</script>';
}
}
?>
Código HTML:
<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"> </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>