Friday, August 6, 2010

How to create an application using form controls to accept students details ?

form control in html


How to create an application using form controls to accept students details ?
Here's the basics. You can enhance this however you want:





%26lt;html%26gt;


%26lt;head%26gt;


%26lt;title%26gt;My signup%26lt;/title%26gt;


%26lt;style type=';text/css';%26gt;


body { margin: 0; padding: 0; }


form { font-family: Verdana, Helvetica, sans-serif; font-size: 20px; }


.labels { width: 125px; float: left; background-color: #F8ECE0; padding-top: 2px; padding-bottom: 2px; }


.inputs { width: 200px; margin-left: 0; padding-top: 4px; padding-bottom: 3px; float: left; font-family: Verdana; background-color: #F8ECE0; }


form input { border: 1px solid gray; background-color: #fff; }


form button { margin-left: 66%; margin-right: 66%; }


form br { background-color: #fff; clear: both; }


%26lt;/style%26gt;


%26lt;/head%26gt;





%26lt;body%26gt;


%26lt;!-- myscript.php is a script that inserts the username/password into a table --%26gt;


%26lt;form action=';myscript.php';%26gt;


%26lt;div class=';labels';%26gt;%26lt;label for=';username';%26gt;Username:%26lt;/label%26gt;%26lt;/div%26gt; %26lt;div class=';inputs';%26gt;%26lt;input type=';text'; name=';username';%26gt;%26lt;/div%26gt;%26lt;br%26gt;


%26lt;div class=';labels';%26gt;%26lt;label for=';email_addr';%26gt;Email:%26lt;/label%26gt;%26lt;/div%26gt; %26lt;div class=';inputs';%26gt;%26lt;input type=';text'; name=';email_addr';%26gt;%26lt;/div%26gt;%26lt;br%26gt;


%26lt;div class=';labels';%26gt;%26lt;label for=';password';%26gt;Password:%26lt;/label%26gt;%26lt;/div%26gt; %26lt;div class=';inputs';%26gt;%26lt;input type=';password'; name=';passwd';%26gt;%26lt;/div%26gt;%26lt;br%26gt;


%26lt;div class=';inputs';%26gt;%26lt;button name=';submit'; value=';Submit';%26gt;Submit%26lt;/button%26gt;%26lt;/div%26gt;%26lt;br%26gt;


%26lt;/form%26gt;


%26lt;br%26gt;


%26amp;copy; 2008 by Me


%26lt;/body%26gt;


%26lt;/html%26gt;

No comments:

Post a Comment