PHP Files

Discussion in 'Web Design and Development' started by JackT06, Aug 18, 2009.

  1. JackT06 macrumors 6502

    JackT06

    Joined:
    Jul 24, 2009
    #1
    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>
     
  2. Antowns macrumors member

    Joined:
    Jul 24, 2009
    #2
    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
     
  3. rowsdower macrumors 6502

    Joined:
    Jun 2, 2009
    #3
    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).
     

Share This Page