Saturday, November 22, 2014

slideshow

This is my first slideshow.
...

Thursday, October 30, 2014

Create form using text box, check box, radio button, select, submit button. And display user inserted value in new PHP page (e.g. student registration/inventory/library form).



Code: registration.html

<html>
          <head>
          <title>registration from</title>
          </head>
         
          <body>
          <form method="get" action="form2.php">
                   <table align="center" height="100%" width="100%" border="2">
                   <tr height="20%">
<td colspan="3"><center><h1><b>Registration form</b></h1></center></td>
                   </tr>
                   <tr height="60%">
                             <td width="20%">&nbsp;</td>
                             <td width="60%">
                                      <table align="center" height="100%">
                                                <th>name:</th>
                                                <td>
                                                          <input type="text" name="txt_name">
                                                </td>
                                      </tr>
                  
                                      <tr>
                                                <th>User name:</th>
                                                <td>
                                                          <input type="text" name="txt_uname">
                                                </td>
                                      </tr>
                                      <tr>
                                                <th>Password:</th>
                                                <td>
                                                          <input type="password" name="pwd">
                                                </td>
                                      </tr>
                                      <tr>
                                                <th>Hobby:</th>
                                                <td>
<input type="checkbox" name= "check_list[]" value="reading">reading
<input type="checkbox" name= "check_list[]" value="writing">writing
<input type="checkbox" name= "check_list[]" value="playing">playing
                                                </td>
                                      </tr>
                                      <tr>
                                                <th>City:</th>
                                                <td>
                                                           <select name="dd_city">
<option value="Rajkot">Rajkot </option>
<option value="Baroda">Baroda </option>
<option value="Mumbai">Mumbai </option>
                                                                    <option value="Pune">Pune                                                                     </option>
                                                          </select>
                                                </td>
                                      </tr>
                                      <tr>
                                                <th>Gender:</th>
                                                <td>
                                                          <input type="radio" name="rb" value=                                                     "male">Male<br>
                                                          <input type="radio" name="rb" value=                                                     "female">Female
                                                </td>
                                      </tr>
                                      <tr>
                                                <th>Phone no:</th>
                                                <td>
                                                          <input type="text" name="txt_phone">
                                                </td>
                                      </tr>
                                      <tr>
                                                <th>Email:</th>
                                                <td>
                                                          <input type="text" name="txt_mail">
                                                </td>
                                      </tr>
                                      <tr>
                                                <td align="center">
                                                          <input type="submit" value="submit">
                                                </td>
                                                <td>
                                                          <input type="reset" value="reset">
                                                </td>
                                      </tr>
                             </td>
                             </table>
                             <td width="20%">&nbsp;</td>
                   </tr>
                   <tr height="20%">
<td colspan="3"><center><h2><b><i>Prepered By:Harshiv Parsana</i></b></h2></center></td>
                   </tr>
          </table>

          </form>
          </body>
         
</html>


Code: form2.php

<html>
          <head>
                   <title>harshiv</title>
          </head>
          <body>
          <form action="form2.php" method="get">
          <table border='3' height=100% width=100% align="center" style="font-   size:x-large">
                   <tr>
<td colspan="3" height=20%><center><h1><b>Registration form</b></h1></center></td>

                   </tr>
                   <tr>
                             <td width=20%>&nbsp</td>
                             <td align="justify">
                                      <?php

                                                echo "name:";
                                                $name=$_GET["txt_name"];
                                                echo " $name"." </br>";

                                                echo "Username::";
                                                $uname=$_GET["txt_uname"];
                                                echo "$uname"." </br>";
         
                                                echo "Password::";
                                                $pwd=$_GET["pwd"];
                                                echo "$pwd"." </br>";

                                                echo "hobby:";
                                                if(isset($_GET['check_list'])){
                                                if(!empty($_GET['check_list'])){

                                                foreach($_GET['check_list'] as $selected){
                                                echo $selected."</br>";
                                                }
                                                }
                                                }
                                                echo "city:";
                                                $city=$_GET["dd_city"];
                                                echo "$city"." </br>";

                                                echo "gender:";
                                                echo $_GET['rb']."</br>"; 

                                                echo "Phone no:";
                                                $Phoneno=$_GET["txt_phone"];
                                                echo "$Phoneno"." </br>";

                                                echo "Email:";
                                                $email=$_GET["txt_mail"];
                                                echo "$email"." </br>";

                                      ?>

                             </td>
                             <td width=20%>&nbsp</td>
                   </tr>
                   <tr>
<td colspan="3" height=20%><center><h2><b><i>Prepered By:Harshiv Parsana</i></b></h2></center></td>

                   </tr>
          </table>
          </form>
          </body>
</html>      



Output:


code for Google

<html>
    <head>
        <title> Google </title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
<!--
a:link {
    text-decoration: none;
}
a:visited {
    text-decoration: blink;
}
a:hover {
    text-decoration: underline;
}
a:active {
    text-decoration: none;
}
-->
</style></head>

<body style="font-family:Arial, Helvetica, sans-serif">

<header>
    <h4 align="right"> <a href="https://plus.google.com/?gpsrc=ogpy0&tab=wX" style="color:#333333"> +You </a> &nbsp; <a href="https://mail.google.com/mail/?tab=wm" style="color:#333333"> Gmail </a> &nbsp; <a href="https://www.google.co.in/imghp?hl=en&tab=wi&ei=G9_RU43DE4-WuASiq4GQAg&ved=0CAQQqi4oAg" style="color:#333333"> Images </a> &nbsp; <img src="icon.png">
    &nbsp;  <a href="https://accounts.google.com/ServiceLogin?hl=en&continue=https://www.google.co.in/%3Fgfe_rd%3Dcr%26ei%3DGt_RU5PEJczM8geOlYCYBA" ><label style="background-color:#4486FA;color:#FFFFFF;margin:1px;padding:10px;border-style:hidden;" >Sign In</label> </a></h3>
<table border="0" height="100%" width="100%">

    <tr height="8%">
        <td colspan="2" align="right">
   
        </td>
   
    </tr>
   
    <tr align="center">
        <td colspan="2"><a href="https://www.google.co.in/?gfe_rd=cr&ei=Gt_RU5PEJczM8geOlYCYBA"> <img src="google.png" height="120" width="350"></a>  <br><br>  <input type="text" size="70" width="10px"></input>   <br> <br> <a href="https://www.google.co.in/?gfe_rd=cr&ei=Gt_RU5PEJczM8geOlYCYBA"<label style="background-color:#F2F2F2; color:#000000 ;border-style:hidden; padding:5px;"> Google Search </label> </a> &nbsp;&nbsp;<a href="https://www.google.com/doodles"> <label style="background-color:#F2F2F2;color:#000000;border-style:hidden;padding:5px; ">I'm Feeling Lucky</label></a> <br><br><br><br> Google.co.in offered in:
        <a href="https://www.google.co.in/setprefs?sig=0_sn2a8ww2WnUjr_rL2xNN1-xBcCA%3D&hl=hi&source=homepage" style="color:#0000FF"> Hindi</a>  
        <a href="https://www.google.co.in/setprefs?sig=0_psIZM9H2xEoS1xCTyCLT6rxWfz8%3D&hl=bn&source=homepage" style="color:#0000FF"> Bengali </a>
        <a href="https://www.google.co.in/setprefs?sig=0_psIZM9H2xEoS1xCTyCLT6rxWfz8%3D&hl=te&source=homepage" style="color:#0000FF"> Telugu </a>
        <a href="https://www.google.co.in/setprefs?sig=0_psIZM9H2xEoS1xCTyCLT6rxWfz8%3D&hl=mr&source=homepage" style="color:#0000FF"> Marathi </a>
        <a href="https://www.google.co.in/setprefs?sig=0_psIZM9H2xEoS1xCTyCLT6rxWfz8%3D&hl=ta&source=homepage" style="color:#0000FF"> Tamil </a>
        <a href="https://www.google.co.in/setprefs?sig=0_psIZM9H2xEoS1xCTyCLT6rxWfz8%3D&hl=gu&source=homepage" style="color:#0000FF"> Gujarati </a>
        <a href="https://www.google.co.in/setprefs?sig=0_psIZM9H2xEoS1xCTyCLT6rxWfz8%3D&hl=kn&source=homepage" style="color:#0000FF"> Kannada </a>
        <a href="https://www.google.co.in/setprefs?sig=0_psIZM9H2xEoS1xCTyCLT6rxWfz8%3D&hl=ml&source=homepage" style="color:#0000FF"> Malayalam </a>
        <a href="https://www.google.co.in/setprefs?sig=0_psIZM9H2xEoS1xCTyCLT6rxWfz8%3D&hl=pa&source=homepage" style="color:#0000FF"> Punjabi </a>
        </td>
    </tr>
   
    <tr height="10%">
        <td align="left">
            <a href="https://www.google.co.in/intl/en/ads/?fg=1">Advertising</a> &nbsp;
            <a href="https://www.google.co.in/services/?fg=1">Business</a> &nbsp;
            <a href="https://www.google.co.in/intl/en/about.html?fg=1">About</a> &nbsp;
        </td>
        <td align="right">
            <a href="https://www.google.co.in/intl/en/ads/?fg=1">Privacy & Terms</a>&nbsp;
            <a href="https://www.google.co.in/intl/en/ads/?fg=1">Settings</a>
            <a href="https://www.google.co.in/intl/en/ads/?fg=1">Use Google.com</a>&nbsp;
    </tr>
   
    </table>

</body>
</html>