Click here to Skip to main content
15,888,238 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
PHP
i coded in html but it doesn't work?

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
	<style type="text/css">
	#text {
    	width:170px;
    	height:100px;
    	margin-left:5px;
 	}
	</style>
        <form action="" method="post" >
    <input type="text" name="un" width="250em"> 
    <input type="password" name="un2" />
    <input type="submit" value="submit" name="submit" />
</form>
    </head>
    <body>
        <?php
        echo("this is Awesome");
        if(!empty($_POST)) {
    $users1 = $_POST['un'];
    echo $users1;
}
        ?>
    </body>
</html>
Posted
Updated 4-Jan-14 18:53pm
v2
Comments
archies_gall 5-Jan-14 1:01am    
Hi,

In your first input type you have mentioned width="250em", if you add same width for all input types then the text boxes will be aligned. As far HTML is concerned if you don't specify the width attribute then the text boxes are in aligned format only.

Let me know if this is only your query. OR i have missed something.

Regards,
promod madushan 5-Jan-14 1:27am    
thanks for the reply..
but i gave 250 know? so textbox will be longer than other textbox.
but all the textboxes remain same?..

1 solution

You code is not constructed corrected. For example, the form should be in the body section and not in the head section. Check this out: php_forms[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900