Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

JackT06

macrumors 6502
Original poster
Jul 24, 2009
293
0
Does anyone know why this aint displaying right?

Its a login scrypt that i am i currnelty working on. But i thought that it would be able to display what it looks like at the moment put all what i get is a blank screen is there something wrong in my code?

Code:
<!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>Login to access the secret files!</title>
</head>

<body>
	<div id="login">
		<form method="post" action="">
			<h2> Login <small> enter you credentials</small></h2>
				<p> 
					<label for="name"> Username: </label>
					<input type="text" name="username"/>
					</p>
				<p>
					<label for="pwd"> Password: </label>
					<input type="password" name="pwd"/>
					</p>
					
					<p>
						<imput type="submit" id="submit" value="Login" name="submit"/>
						</p>
				</form>
		
		</div><!--end login-->
		</body>
		</html>
 
Theres nothing wrong with that code although theres no PHP code there so you should just save that as a .html file and use a PHP backend to handle the posted data there redirect the user / create a session.

You can't just preview a .php file without having the php framework installed on the web server you're using.

Edit: You can get the php framework from www.php.net
 
Code:
<imput type="submit" id="submit" value="Login" name="submit"/>

You have a typo with "imput" here. However, the rest of the page displays fine for me. As a previous poster mentioned, this is purely HTML (no PHP).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.