Pagina Web
Enviado por yuri_liz • 18 de Octubre de 2012 • 207 Palabras (1 Páginas) • 257 Visitas
Codigo index
Diseño index
codigo saludito phpCodigo index
Diseño index
codigo saludito php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>
<?php
$numero1=$_POST['txtnumero1'];
$numero2=$_POST['txtnumero2'];
if($numero1==" ")
{
echo "es necesario rellenar el primer campo";
}
if($numero2==" ")
{
echo "es necesario rellenar el segundo campo";
}
else if($numero1<0)
{
echo "no se hacepta numeros negativos";
}
else if($numero2<0)
{
echo "no se hacepta numeros negativos";
}
else
{
echo "tu suma es: ", ($numero1 + $numero2);
}
?>
<body>
</body>
</html>
Ejecucion
MySQL
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>
<?php
$numero1=$_POST['txtnumero1'];
$numero2=$_POST['txtnumero2'];
if($numero1==" ")
{
echo "es necesario rellenar el primer campo";
}
if($numero2==" ")
{
echo "es necesario rellenar el segundo campo";
}
else if($numero1<0)
{
echo "no se hacepta numeros negativos";
}
else if($numero2<0)
{
echo "no se hacepta numeros negativos";
}
else
{
echo "tu suma es: ", ($numero1 + $numero2);
}
?>
<body>
</body>
</html>
Ejecucion
MySQL
...