Ver Mensaje Individual
  #3 (permalink)  
Antiguo 21/05/2011, 17:00
matiasgreisert
 
Fecha de Ingreso: mayo-2011
Mensajes: 23
Antigüedad: 13 años
Puntos: 0
Respuesta: Creacion de div con valores de post

Es cierto gracias, ahi lo modifique pero me sigue sin aparecer el Div. Espero una respuesta gracias

<?php if($_SERVER['REQUEST_METHOD']=="GET"){ ?>
<form method="POST">
Top
<input type="text" name="top" />
<br />
Left
<input type="text" name="left" />
<br />
Width
<input type="text" name="width" />
<br />
Height
<input type="text" name="height" />
<br />
<input type="submit"/>
</form>
<?php
}else if($_SERVER['REQUEST_METHOD']=="POST"){
if(isset($_POST["top"])){
if(is_numeric($_POST["top"]))
$top= $_POST["top"];
else {
echo 'Top no es numerico';
}
}
if(isset($_POST["left"])){
if(is_numeric($_POST["left"]))
$left= $_POST["left"];
else {
echo 'Left no es numerico';
}
}
if(isset($_POST["width"])){
if(is_numeric($_POST["width"]))
$width= $_POST["width"];
else {
echo 'Width no es numerico';
}
}
if(isset($_POST["height"])){
if(is_numeric($_POST["height"]))
$height= $_POST["height"];
else {
echo 'Width no es numerico';
}
}
if(is_numeric($width)&&($height)&&($left)&&($top)) {
echo "<div style = top:$top.'px'; left:$left.'px'; height:$height.'px'; width:$width.'px'; backgroud-color:blue>";
echo "</div>";
}
}
?>