Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/10/2012, 11:24
Avatar de archios
archios
 
Fecha de Ingreso: octubre-2012
Ubicación: coahuila mexico
Mensajes: 23
Antigüedad: 11 años, 7 meses
Puntos: 0
Información Problema con php mmm...

mi problema es este al momento de correr un archivo php me lansa todo el codigo lo adjunto para ver si notan algun error o es problema del wamp si alguien sabe donde tengo que modificarlo o asi se agradece su ayuda soy algo nuevo con paginas web


Esto es lo que me lanza al momento de correrlo todo el codigo

<?php
session_start();
?>
<!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>

<body>
<?php

$form = "<form action='./login.php' method='post'>
<table>
<tr>
<td> Username:</td>
<td><input type='text' /><td>

</tr>
</table>

<table>
<tr>
<td> Password:</td>
<td><input type='password' name='password' /><td>

</tr>
<table>
<tr>
<td></td>
<td><input type='submit' name='loginbtn' value='Login' /><td>

</tr>
</table>
</form>";

if ($_POST['loginbtn']){
$user= $_POST['user'];
$password = $_POST['password'];

if ($user){
if($password){
echo "$user - $password <hr />$form";

}

else
echo "You must enter your username. $form";

}
else
echo "You must enter your username. $form";

}
else
echo $form;


?>
</body>
</html>