Rabu, 13 Maret 2013

Membuat biodata Pribadi dengan php /html

1.berikut ini source codenya

 

 

<!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>Biodataku</title>
<style type="text/css">
<!--
body {
    font: 100% Verdana, Arial, Helvetica, sans-serif;
    background: #666666;
    margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
    padding: 0;
    text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
    color: #000000;
}
.oneColFixCtrHdr #container {
    width: 780px;  /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
    background: #FFFFFF;
    margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
    border: 1px solid #000000;
    text-align: left; /* this overrides the text-align: center on the body element. */
}
.oneColFixCtrHdr #header {
    background: #DDDDDD;
    padding: 0 10px 0 20px;  /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
}
.oneColFixCtrHdr #header h1 {
    margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
    padding: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
    text-align: center;
}
.oneColFixCtrHdr #mainContent {
    padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
    background: #FFFFFF;
    text-align: center;
}
.oneColFixCtrHdr #footer {
    padding: 0 10px; /* this padding matches the left alignment of the elements in the divs that appear above it. */
    background:#DDDDDD;
}
.oneColFixCtrHdr #footer p {
    margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
    padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
}
.oneColFixCtrHdr #container #mainContent #form1 table {
    text-align: left;
    font-size: 100%;
    font-family: Verdana, Arial, Helvetica, sans-serif;
}
-->
</style></head>

<body class="oneColFixCtrHdr">

<div id="container">
  <div id="header">
    <h1>My Biodata</h1>
  <!-- end #header --></div>
  <div id="mainContent">
    <form id="form1" name="form1" method="post" action="">
    <table width="607" border="0">
    <tr>
      <td><img src="/mahasiswa/20130216_1000171_2.jpg" width="118" height="144" /></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
    <td width="185">Nama</td>
    <td width="10">:</td>
    <td width="401"><label>
      <input name="nama" type="text" id="nama" value="M.Imam Asyari" />
    </label></td>
    </tr>
    <tr>
    <td>Nim</td>
    <td>:</td>
    <td><label>
      <input name="nim" type="text" id="nim" value="1110652002" />
    </label></td>
    </tr>
    <tr>
    <td>Tempat Lahir</td>
    <td>:</td>
    <td><label>
      <input name="tmplahir" type="text" id="tmplahir" value="Banyuwangi" size="55" />
    </label></td>
    </tr>
    <tr>
    <td>Tanggal lahir</td>
    <td>:</td>
    <td><label>Tanggal
      <select name="tgl" id="tgl">
      <?
      for ($i=1;$i<=31;$i++)
             {
               echo "<option value=".$i.">".$i."</option>";
             }
     
      ?>
      </select>
    Bulan
    <select name="bln" id="bln">
    <?
             $bulan=array("","Januari","Pebruari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember");
             for ($i=1;$i<=12;$i++)
             {
               echo "<option value=".$i.">".$bulan[$i]."</option>";
             }
          ?>
    </select>
    Tahun
    <select name="thn" id="thn">
     <?
             for ($i=1980;$i<=2013;$i++)
             {
               echo "<option value=".$i.">".$i."</option>";
             }
          ?>
    </select>
    </label></td>
    </tr>
    <tr>
    <td>Alamat</td>
    <td>:</td>
    <td><label>
      <textarea name="alamat" cols="55" rows="5" id="alamat" >Perumahan Pesona Surya Milenia Blok C8.No.3</textarea>
     
    </label></td>
    </tr>
    <tr>
    <td>Jenis Kelamin</td>
    <td>:</td>
    <td><label>
      <input name="radio" type="radio" id="L" value="L" checked="checked" />
    Laki - Laki
    <input type="radio" name="radio" id="prm" value="prm" />
    Perempuan</label></td>
    </tr>
    <tr>
    <td>Riwayat Pendidikan</td>
    <td>:</td>
    <td><label>
      <input name="sd" type="checkbox" id="sd" checked="checked" />
    Mi Mifathul Huda
   
    <br />
    <input name="smp" type="checkbox" id="smp" checked="checked" />
    MTS N Srono BWI
    <br />
    <input name="sma" type="checkbox" id="sma" checked="checked" />
    SMU Islam Lumajang
    <br/>
    <input name="smu" type="checkbox" id="smu" checked="checked" />
    S1 Universitas Muhammadiyah
    </label></td>
    </tr>
    <tr>
      <td>Hobby</td>
      <td>:</td>
      <td><select name="hby2" id="hby2">
        <option>Olah Raga</option>
        <option>Musik</option>
        <option>Membaca</option>
        <option>Game</option>
        <option>Traveling</option>
        <option>Hacker</option>
      </select></td>
    </tr>
    <tr>
      <td>Alama web/Blog</td>
      <td>&nbsp;</td>
      <td><a href="http://imasict.blogspot.com">http://imasict.blogspot.com</a></td>
    </tr>
    <tr>
    <td>Deskripsi Diri</td>
    <td>:</td>
    <td></label>
      <label>
        <textarea name="dd" id="dd" cols="55" rows="5">Saya Mahasiswa Teknik informatiak sore angakatan 2011</textarea>
      </label></td>
    </tr>
    </table>
    </form>
    <h1>&nbsp;</h1>
    <!-- end #mainContent --></div>
  <div id="footer">
    <p> March 13, 2013</p>
  <!-- end #footer --></div>
<!-- end #container --></div>
</body>
</html>

2. ini contoh Formnya

 

image

Selamat Mencoba