Posted by: Sourav | May 2, 2011

My first php enabled form


<html>
    <head>
        <title>
            My Seventh Page
        </title>
    </head>
    <body>
      <table width=”396″ align=”center”  cellpadding=”1″ cellspacing=”1″
             bordercolor=”#000000″ bgcolor=”#FFFFFF”>
        <tr>
            <td>
                <fieldset>
                    <legend>
                        <font color=”blue”>Publisher Details</font>
                    </legend>
                 <table width=”389″ align=”center”  cellpadding=”1″ cellspacing=”1″
             bordercolor=”#000000″>
                   
                            <form action=”pub.php” method=”post” name=”pubdetails”>
                              <tr>
                                <td>Publisher Name:</td>
                                <td>
                                    <input type=”text” maxlength=”15″ size=”30″ tabindex=”1″ name=”pubname”
                                    value=”<?php echo $_POST[‘pubname’];?>”>
                               
                                </td>
                              </tr>
                              <tr>
                                <td>Company Name:</td>
                                <td>
                                    <input type=”text” maxlength=”15″ size=”30″ tabindex=”2″ name=”companyname”
                                     value=”<?php echo $_POST[‘companyname’];?>”>
                                </td>
                              </tr>
                              <tr>
                                <td>Type Of Book:</td>
                                <td>
                                    <input type=”radio”  tabindex=”3″ name=”bookkind”  value=”Technical”
                                    <?php if($_POST[‘bookkind’]==’Technical’)
                                    echo ‘checked=true’;?>>Technical
                                    <input type=”radio”  tabindex=”4″ name=”bookkind”  value=”Non-Technical”
                                    <?php if($_POST[‘bookkind’]==’Non-Technical’)
                                    echo ‘checked=true’;?>>Non-Technical
                                </td>
                              </tr>
                              <tr>
                                <td>Location:</td>
                                <td>
                                    <input type=”checkbox”  tabindex=”5″ name=”location”  value=”Mumbai”
                                    <?php if($_POST[‘location’]==’Mumbai’)
                                    echo ‘checked=true’;?>>Mumbai
                                    <input type=”checkbox”  tabindex=”6″ name=”location”  value=”Delhi”
                                    <?php if($_POST[‘location’]==’Delhi’)
                                    echo ‘checked=true’;?>>Delhi
                                </td>
                              </tr>
                              <tr>
                                <td>Select A Book:</td>
                                <td>
                                    <select name=”selectbook” size=”1″ tabindex=”7″>
                                        <option <?php if($_POST[‘selectbook’]==’PHP’)
                                        echo ‘selected’;?>>PHP</option>
                                        <option <?php if($_POST[‘selectbook’]==’PHP’)
                                        echo ‘selected’;?>>MySQL</option>
                                        <option <?php if($_POST[‘selectbook’]==’PHP’)
                                        echo ‘selected’;?>>APACHE</option>
                                        <option <?php if($_POST[‘selectbook’]==’PHP’)
                                        echo ‘selected’;?>>ORACLE</option>
                                        <option <?php if($_POST[‘selectbook’]==’PHP’)
                                        echo ‘selected’;?>>JAVA</option>
                                    </select>
                                                                    
                                </td>
                              </tr>
                               <tr>
                                <td>Publisher Code:</td>
                                <td>
                                    <input type=”password” maxlength=”15″ size=”30″ tabindex=”8″ name=”pubpass”
                               value=”<?php echo $_POST[‘pubpass’];?>”>
                               
                                </td>
                              </tr>
                               <tr>
                                <td>Comments:</td>
                                <td>
                                    <textarea rows=”6″ column=”30″ tabindex=”9″ name=”comments”>
                                   <?php echo $_POST[‘comments’];?>
                                    </textarea>
                                </td>
                              </tr>
                               <tr>
                               
                                <td>
                                    <input type=”submit” name=”submit” tabindex=”9″ value=”submit”>
                                    <input type=”reset” name=”reset” tabindex=”10″ value=”clear”>
                                </td>
                              </tr>
                               <tr>
                               
                                <td>
                                    <input type=”hidden” name=”formname”  value=”pubdetails”>
                                      
                                </td>
                              </tr>
                            
                            </form>
                       
                 </table>
                </fieldset></td>
        </tr>
      </table>
         
    </body>
</html>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: