Ver Mensaje Individual
  #6 (permalink)  
Antiguo 21/05/2011, 21:04
Avatar de gildus
gildus
 
Fecha de Ingreso: agosto-2003
Mensajes: 1.495
Antigüedad: 20 años, 8 meses
Puntos: 105
Respuesta: Creacion de div con valores de post

Holas,

Le di una vista rapida al codigo, y mas o menos seria asi:

Código PHP:
Ver original
  1. <?php
  2. if(isset($_GET))
  3. { ?>
  4.     <form method="POST">
  5.         Top
  6.         <input type="text" name="top" />
  7.         <br />
  8.         Left
  9.         <input type="text" name="left" />
  10.         <br />
  11.         Width
  12.         <input type="text" name="width" />
  13.         <br />
  14.         Height
  15.         <input type="text" name="height" />
  16.         <br />
  17.         <input type="submit"/>
  18.     </form>
  19. <?php
  20. }
  21. else
  22. {   if(isset($_POST))
  23.     {
  24.         if(isset($_POST["top"]))
  25.         {
  26.             if(is_numeric($_POST["top"]))       $top= $_POST["top"];
  27.             else            echo 'Top no es numerico';
  28.         }
  29.        
  30.         if(isset($_POST["left"]))
  31.         {   if(is_numeric($_POST["left"]))      $left= $_POST["left"];
  32.             else            echo 'Left no es numerico';
  33.         }
  34.        
  35.         if(isset($_POST["width"]))
  36.         {
  37.             if(is_numeric($_POST["width"]))     $width= $_POST["width"];
  38.             else            echo 'Width no es numerico';
  39.            
  40.         }
  41.    
  42.         if(isset($_POST["height"]))
  43.         {
  44.             if(is_numeric($_POST["height"]))    $height= $_POST["height"];
  45.             else            echo 'Width no es numerico';
  46.         }
  47.    
  48.         if(is_numeric($width)&& is_numeric($height) && is_numeric($left) && is_numeric($top))
  49.         {
  50.             echo "<div style = 'top:".$top."px; left:".$left."px; height:".$height."px; width:".$width."px; backgroud-color:blue;'>";
  51.             echo "</div>";
  52.         }
  53.     }
  54. }
  55. ?>

Saludos
Gildus
__________________
.: Gildus :.