Maaf sebelum nya, Saya baru belajar php mohon bantuan nya,begini saya punya dua form php yang berbeda, yang satu buat isian pencarian nya, Misal form satu untuk mencari nomor registrasi. Kode nya seperti ini:
<!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>::: Print Form Pendaftaran :::</title>
</head>

<body>
<div align="center">
  <form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
    <table width="672" border="0">
      <tr>
        <td height="80" colspan="3" bgcolor="#FFCC66"><div align="center"><font size="6"><strong>Print Form Pendaftaran</strong></font></div></td>
      </tr>
      <tr>
        <td colspan="3">&nbsp;</td>
      </tr>
      <tr>
        <td width="197">Masukkan No Registrasi Anda</td>
        <td width="52"><div align="center">:</div></td>
        <td width="409"><label for="txtnoreg"></label>
          <input name="txtnoreg" type="text" id="txtnoreg" value="<?php echo $_POST['txtnoreg']; ?>" size="25" maxlength="50" />
          <input type="submit" name="button" id="button" value="CARI" /></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table>
    <p>
      <?php
		
	
	include "koneksi.php";
	//$no_reg		= $_POST['txtnoreg'];
	//$sqlTampil	= "SELECT * FROM data_siswa WHERE no_registrasi='$no_reg'";
	//$qryTampil	= mysql_query($sqlTampil, $koneksi) or die ("Gagal SQL Query".mysql_error());
	//$dataTampil	= mysql_fetch_array($qryTampil);
	
	
	  	
		if ((isset($_POST['txtnoreg'])) AND ($_POST['txtnoreg'] <> "")) {
  
		  $no_reg = $_POST['txtnoreg'];
		  $sql = mysql_query("SELECT * FROM data_siswa WHERE no_registrasi='$no_reg'") or die(mysql_error());
		  //menampilkan jumlah hasil pencarian
		  $jumlah = mysql_num_rows($sql); 
		  if ($jumlah > 0) {
					   
				while ($res=mysql_fetch_array($sql)) {
				
				echo "<br>";
				echo "<center><h1>Nomor Registrasi : <b>$no_reg</b> Ditemukan</h1></center><br>";
				echo "<center><h2><a href ='../psb/cetak_form.php'>Klik Disini Untuk Melanjutkan</a></h2></center>";
				//include "cetak_form.php";
			  }
		  }
		  else {
		   // menampilkan pesan zero data
		   	
			echo '<center><h1>Maaf, hasil pencarian tidak ditemukan.</center></h1>';
			/*echo "<script language='JavaScript'>alert('Data Tidak Ditemukan');</script>"; */
             
		  }
		} 
		else { echo '<center><h1>Silahkan Masukkan Nomor Registrasi nya</center></h1>';} 

			
?></p>
  </form>
</div>
</body>
</html>

Nah untuk form ke-2 bertujuan untuk menampilkan isi yang pertama tadi, kode nya seperti ini :
<?php
		
	
	include "koneksi.php";
	$no_reg		= $_POST['txtnoreg'];
	
	$sqlTampil	= "SELECT * FROM data_siswa WHERE no_registrasi='$no_reg'";
	$qryTampil	= mysql_query($sqlTampil, $koneksi) or die ("Gagal SQL Query".mysql_error());
	$dataTampil	= mysql_fetch_array($qryTampil);
	
			
?>
<!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>::: Print Form Data Calon Siswa Baru Pendaftaran PSB SMAN 3 Unggulan Kayuagung :::</title>

</head>

<body bgcolor="#FFFFFF">
<table width="100%" border="0">
  <tr>
    <td width="16%" rowspan="6"><div align="center"><img src="images/logo_oki.jpg" width="113" height="117" alt="Logo Kab OKI Sumsel" /></div></td>
    <td width="60%"><div align="center"><strong>SMA NEGERI 3 UNGGULAN KABUPATEN OKI</strong></div></td>
    <td width="16%" rowspan="6"><div align="center"><img src="images/lambang.jpg" alt="Lambang SMAN 3 Kayuagung" width="113" height="117" align="middle" /></div></td>
  </tr>
  <tr>
    <td><div align="center"><strong>RINTISAN SEKOLAH MENENGAH ATAS BERTARAF INTERNASIONAL (R-SMA-BI)</strong></div></td>
  </tr>
  <tr>
    <td><div align="center"><strong>TERAKREDITASI: A (Amat Baik)</strong></div></td>
  </tr>
  <tr>
    <td><div align="center"><em>Jl. Letnan Sayuti Kelurahan Kedaton Telp./Fax: (0712) 321223 Kayuagung</em></div></td>
  </tr>
  <tr>
    <td><div align="center"><em>Web Site: www.sman3-kag.sch.id  E-Mail: sekolah@sman3-kag.sch.id</em></div></td>
  </tr>
  <tr>
    <td><div align="center"></div></td>
  </tr>
  <tr>
    <td colspan="3"><div align="center">
      <p style="margin-bottom:0; margin-top:0"><strong>DATA CALON </strong><strong> SISWA BARU </strong></p>
<p style="margin-bottom:0; margin-top:0"><strong>TAHUN PELAJARAN 2012 - 2013</strong></p><br />
      <form action="" method="post" name="form1" id="form1">
        <table width="85%" border="0">
          <tr>
            <td bgcolor="#FFFF99"><strong>Data Pribadi</strong><br />
              <table width="100%" border="1" cellpadding="0" cellspacing="0">
                <tr>
                  <td><table width="100%" border="0">
                    <tr>
                      <td width="15%" align="left" valign="top">No. Registrasi</td>
                      <td width="3%" align="left" valign="top"><div align="center">:</div></td>
                      <td width="82%" align="left" valign="top"><input name="txtnoreg" type="text" id="txtnoreg" value="<?php echo $dataTampil['no_registrasi']; ?>" readonly="readonly" /></td>
                    </tr>
                    <tr>
                      <td align="left" valign="top">Nama Calon Siswa</td>
                      <td align="left" valign="top"><div align="center">:</div></td>
                      <td align="left" valign="top"><input name="txtcalonsiswa" type="text" id="txtcalonsiswa" size="50" readonly="readonly"/></td                     
                    ></tr>
                    <tr>
                      <td align="left" valign="top">Jenis Kelamin</td>
                      <td align="left" valign="top"><div align="center">:</div></td>
                      <td align="left" valign="top"><input name="txtjk" type="text" id="txtjk" readonly="readonly" /></td>
                    </tr>
                    <tr>
                      <td align="left" valign="top">Tempat Lahir</td>
                      <td align="left" valign="top"><div align="center">:</div></td>
                      <td align="left" valign="top"><input name="txttempatlahir" type="text" id="txttempatlahir" readonly="readonly" /></td>
                    </tr>
                    <tr>
                      <td align="left" valign="top">Tanggal Lahir</td>
                      <td align="left" valign="top"><div align="center">:</div></td>
                      <td align="left" valign="top"><input name="txttgllahir" type="text" id="txttgllahir" readonly="readonly" /></td>
                    </tr>
                    <tr>
                      <td align="left" valign="top">Alamat Calon Siswa</td>
                      <td align="left" valign="top"><div align="center">:</div></td>
                      <td align="left" valign="top"><table width="100%" border="0">
                        <tr>
                          <td colspan="3" align="left" valign="top"><textarea name="txtalamat" cols="50" rows="3" readonly="readonly" id="txtalamat"></textarea></td>
                          </tr>
                        <tr>
                          <td width="18%" align="left" valign="top">Hp / Telepon</td>
                          <td width="3%" align="left" valign="top"><div align="center">:</div></td>
                          <td width="79%" align="left" valign="top"><input name="txthp" type="text" id="txthp" onkeyup="checkNumber(this)" size="30" readonly="readonly"/>
                            /
                            <input name="txttelepon" type="text" id="txttelepon" onkeyup="checkNumber(this)" size="30" readonly="readonly"/> 
                            <em>*) Isi dengan Angka</em></td>
                        </tr>
                      </table></td>
                    </tr>
                    <tr>
                      <td align="left" valign="top">Asal SMP / MTs</td>
                      <td align="left" valign="top"><div align="center">:</div></td>
                      <td align="left" valign="top"><input name="txtasalsekolah" type="text" id="txtasalsekolah" size="70" readonly="readonly" /></td>
                    </tr>
                    <tr>
                      <td align="left" valign="top">&nbsp;</td>
                      <td align="left" valign="top">&nbsp;</td>
                      <td align="left" valign="top">&nbsp;</td>
                    </tr>
                  </table></td>
                </tr>
              </table></td>
          </tr>
          <tr>
            <td align="left" valign="top" bgcolor="#FFFF99"><strong><br />
              Orang Tua / Wali</strong><br />
              <table width="100%" border="1" cellpadding="0" cellspacing="0">
                <tr>
                  <td>              
              <table width="100%" border="0">
                <tr>
                  <td align="left" valign="top"><em>Ayah</em><br />
                    <table width="100%" border="0">
                      <tr>
                        <td width="16%">Nama  Ayah</td>
                        <td width="3%"><div align="center">:</div></td>
                        <td width="81%"><input name="txtnamaayah" type="text" id="txtnamaayah" size="30" readonly="readonly" /></td>
                      </tr>
                      <tr>
                        <td>Pekerjaan Ayah</td>
                        <td><div align="center">:</div></td>
                        <td><input name="txtkerjaayah" type="text" id="txtkerjaayah" size="35" readonly="readonly" /></td>
                      </tr>
                    </table></td>
                </tr>
                <tr>
                  <td align="left" valign="top"><em>Ibu</em><br />
                    <table width="100%" border="0">
                      <tr>
                        <td width="16%">Nama Ibu</td>
                        <td width="3%"><div align="center">:</div></td>
                        <td width="81%"><input name="txtnamaibu" type="text" id="txtnamaibu" size="30" readonly="readonly" /></td>
                      </tr>
                      <tr>
                        <td>Pekerjaan Ibu</td>
                        <td><div align="center">:</div></td>
                        <td><input name="txtkerjaibu" type="text" id="txtkerjaibu" size="35" readonly="readonly" /></td>
                      </tr>
                    </table></td>
                </tr>
                <tr>
                  <td><em>Wali           *) Diisi jika memiliki wali selain orang tua</em><br />
                    <table width="100%" border="0">
                      <tr>
                        <td width="16%">Nama Wali</td>
                        <td width="3%"><div align="center">:</div></td>
                        <td width="81%"><input name="txtnamawali" type="text" id="txtnamawali" size="30" readonly="readonly" /></td>
                      </tr>
                      <tr>
                        <td>Pekerjaan Wali</td>
                        <td><div align="center">:</div></td>
                        <td><input name="txtnkerjawali" type="text" id="txtnkerjawali" size="35" readonly="readonly" /></td>
                      </tr>
                  </table></td>
                </tr>
              </table>&nbsp;</td>
                </tr>
              </table></td>
          </tr>
          <tr>
            <td align="left" valign="top" bgcolor="#FFFF99"><br />
              <strong>Raport dan Prestasi</strong><br />
              <table width="100%" border="1" cellpadding="0" cellspacing="0">
                <tr>
                  <td>Nilai Raport<br />&nbsp;<em>*) Nilai yang dimasukkan nilai PPK (Kognitif)</em>
                    <table width="100%" border="1" cellpadding="0" cellspacing="0">
                      <tr>
                        <td><div align="center"><strong>Mata Pelajaran</strong></div></td>
                        <td><div align="center"><strong>Smt. 1</strong></div></td>
                        <td><div align="center"><strong>Smt. 2</strong></div></td>
                        <td><div align="center"><strong>Smt. 3</strong></div></td>
                        <td><div align="center"><strong>Smt. 4</strong></div></td>
                        <td><div align="center"><strong>Smt. 5</strong></div></td>
                        </tr>
                      <tr>
                        <td>Bahasa Indonesia</td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtbindosmt1" type="text" id="txtbindosmt1" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtbindosmt2" type="text" id="txtbindosmt2" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtbindosmt3" type="text" id="txtbindosmt3" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtbindosmt4" type="text" id="txtbindosmt4" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtbindosmt5" type="text" id="txtbindosmt5" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        </tr>
                      <tr>
                        <td>Bahasa Inggris</td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtbinggsmt1" type="text" id="txtbinggsmt1" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtbinggsmt2" type="text" id="txtbinggsmt2" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtbinggsmt3" type="text" id="txtbinggsmt3" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtbinggsmt4" type="text" id="txtbinggsmt4" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtbinggsmt5" type="text" id="txtbinggsmt5" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        </tr>
                      <tr>
                        <td>Matematika</td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtmtksmt1" type="text" id="txtmtksmt1" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtmtksmt2" type="text" id="txtmtksmt2" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtmtksmt3" type="text" id="txtmtksmt3" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtmtksmt4" type="text" id="txtmtksmt4" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtmtksmt5" type="text" id="txtmtksmt5" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        </tr>
                      <tr>
                        <td>I P A</td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtipasmt1" type="text" id="txtipasmt1" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtipasmt2" type="text" id="txtipasmt2" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtipasmt3" type="text" id="txtipasmt3" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtipasmt4" type="text" id="txtipasmt4" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtipasmt5" type="text" id="txtipasmt5" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        </tr>
                      <tr>
                        <td>I P S</td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtipssmt1" type="text" id="txtipssmt1" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtipssmt2" type="text" id="txtipssmt2" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtipssmt3" type="text" id="txtipssmt3" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtipssmt4" type="text" id="txtipssmt4" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtipssmt5" type="text" id="txtipssmt5" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        </tr>
                    </table>                    &nbsp;</td>
                </tr>
                <tr>
                  <td height="273">Prestasi<br />
                    <em>*) Diisi jika memiliki piagam dan prestasi</em> &nbsp;
                    <table width="100%" border="0">
                      <tr>
                        <td width="16%" align="left" valign="top">Olimpiade Sains</td>
                        <td width="1%"><div align="center">:</div></td>
                        <td colspan="3" align="left" valign="top"><input name="txtosn" type="text" id="txtosn" readonly="readonly" /></td>
                      </tr>
                      <tr>
                        <td align="left" valign="top">Kompetisi Bhs. Inggris / Bhs. Arab</td>
                        <td><div align="center">:</div></td>
                        <td colspan="3" align="left" valign="top"><input name="txtkoming" type="text" id="txtkoming" readonly="readonly" /></td>
                      </tr>
                      <tr>
                        <td align="left" valign="top">Piagam Per-orangan</td>
                        <td><div align="center">:</div></td>
                        <td colspan="3" align="left" valign="top"><input name="txtlomba1" type="text" id="txtlomba1" size="60" /></td>
                      </tr>
                      <tr>
                        <td align="left" valign="top">Piagam Lainnya</td>
                        <td align="center" valign="top"><div align="center">:</div></td>
                        <td colspan="3" align="left" valign="top"><table width="71%" border="1" cellpadding="0" cellspacing="0">
                          <tr>
                            <td width="5%" align="left" valign="top"><div align="center">No.</div></td>
                            <td width="95%" align="left" valign="top"><div align="center">Nama Kegiatan Lomba dan Juara</div></td>
                            </tr>
                          <tr>
                            <td align="right" valign="top"><div align="center">1.</div></td>
                            <td align="left" valign="top"><div align="left">
                              <input name="txtpiagam1" type="text" id="txtpiagam1" size="80" />
                            </div></td>
                            </tr>
                          <tr>
                            <td align="right" valign="top"><div align="center">2.</div></td>
                            <td align="left" valign="top"><div align="left">
                              <input name="txtpiagam2" type="text" id="txtpiagam2" size="80" />
                            </div></td>
                            </tr>
                          <tr>
                            <td align="right" valign="top"><div align="center">3.</div></td>
                            <td align="left" valign="top"><div align="left">
                              <input name="txtpiagam3" type="text" id="txtpiagam3" size="80" />
                            </div></td>
                            </tr>
                        </table></td>
                      </tr>
                      <tr>
                        <td align="left" valign="top">&nbsp;</td>
                        <td>&nbsp;</td>
                        <td width="15%" align="left" valign="top">&nbsp;</td>
                        <td width="22%" align="left" valign="top">&nbsp;</td>
                        <td width="46%" align="left" valign="top">&nbsp;</td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
          </tr>
          <tr>
            <td align="left" valign="top" bgcolor="#FFFF99"><div align="right">
              <input type="submit" name="button" id="button" value="CETAK FORM" />
            </div></td>
          </tr>
      </table>
      </form>
      <p>&nbsp;</p>
    </div></td>
  </tr>
</table>
</body>
</html>

Catatan : sementara di kode atas saya cuma berniat menampilkan kode registrasi nya saja yg diambil dari form ke-1, tetapi tidak berhasil. Ternyata isi form ke-2 yg di textbox no registrasi kosong.

Kira-kira masalah nya dimana ya? Mohon bantuan nya
Silahkan login untuk menjawab!
1
Loading...
Ellyx Christian · Jan 30, 2012 · 1 Suka · 0 Tidak Suka
jadi pada saat data di temukan akan muncul link "Klik Disini Untuk Melanjutkan", dan saat dklik akan muncul form ke-2 seperti itu? Kalau seperti itu datanya dikirim ke form ke-2 menggunakan get bukan post.
form1
<!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>::: Print Form Pendaftaran :::</title>
</head>
 
<body>
<div align="center">
  <form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
    <table width="672" border="0">
      <tr>
        <td height="80" colspan="3" bgcolor="#FFCC66"><div align="center"><font size="6"><strong>Print Form Pendaftaran</strong></font></div></td>
      </tr>
      <tr>
        <td colspan="3">&nbsp;</td>
      </tr>
      <tr>
        <td width="197">Masukkan No Registrasi Anda</td>
        <td width="52"><div align="center">:</div></td>
        <td width="409"><label for="txtnoreg"></label>
          <input name="txtnoreg" type="text" id="txtnoreg" value="<?php echo $_POST['txtnoreg']; ?>" size="25" maxlength="50" />
          <input type="submit" name="button" id="button" value="CARI" /></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table>
    <p>
      <?php
 
 
	include "koneksi.php";
	//$no_reg		= $_POST['txtnoreg'];
	//$sqlTampil	= "SELECT * FROM data_siswa WHERE no_registrasi='$no_reg'";
	//$qryTampil	= mysql_query($sqlTampil, $koneksi) or die ("Gagal SQL Query".mysql_error());
	//$dataTampil	= mysql_fetch_array($qryTampil);
 
 
 
		if ((isset($_POST['txtnoreg'])) AND ($_POST['txtnoreg'] <> "")) {
 
		  $no_reg = $_POST['txtnoreg'];
		  $sql = mysql_query("SELECT * FROM data_siswa WHERE no_registrasi='$no_reg'") or die(mysql_error());
		  //menampilkan jumlah hasil pencarian
		  $jumlah = mysql_num_rows($sql); 
		  if ($jumlah > 0) {
 
				while ($res=mysql_fetch_array($sql)) {
 
				echo "<br>";
				echo "<center><h1>Nomor Registrasi : <b>$no_reg</b> Ditemukan</h1></center><br>";
				echo "<center><h2><a href ='../psb/cetak_form.php?no_reg=$no_reg'>Klik Disini Untuk Melanjutkan</a></h2></center>";
				//include "cetak_form.php";
			  }
		  }
		  else {
		   // menampilkan pesan zero data
 
			echo '<center><h1>Maaf, hasil pencarian tidak ditemukan.</center></h1>';
			/*echo "<script language='JavaScript'>alert('Data Tidak Ditemukan');</script>"; */
 
		  }
		} 
		else { echo '<center><h1>Silahkan Masukkan Nomor Registrasi nya</center></h1>';} 
 
 
?></p>
  </form>
</div>
</body>
</html>
form ke-2
<?php
	include "koneksi.php";
	$no_reg		= $_GET['no_reg'];
 
	$sqlTampil	= "SELECT * FROM data_siswa WHERE no_registrasi='$no_reg'";
	$qryTampil	= mysql_query($sqlTampil, $koneksi) or die ("Gagal SQL Query".mysql_error());
	$dataTampil	= mysql_fetch_array($qryTampil);
 
 
?>
<!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>::: Print Form Data Calon Siswa Baru Pendaftaran PSB SMAN 3 Unggulan Kayuagung :::</title>
 
</head>
 
<body bgcolor="#FFFFFF">
<table width="100%" border="0">
  <tr>
    <td width="16%" rowspan="6"><div align="center"><img src="images/logo_oki.jpg" width="113" height="117" alt="Logo Kab OKI Sumsel" /></div></td>
    <td width="60%"><div align="center"><strong>SMA NEGERI 3 UNGGULAN KABUPATEN OKI</strong></div></td>
    <td width="16%" rowspan="6"><div align="center"><img src="images/lambang.jpg" alt="Lambang SMAN 3 Kayuagung" width="113" height="117" align="middle" /></div></td>
  </tr>
  <tr>
    <td><div align="center"><strong>RINTISAN SEKOLAH MENENGAH ATAS BERTARAF INTERNASIONAL (R-SMA-BI)</strong></div></td>
  </tr>
  <tr>
    <td><div align="center"><strong>TERAKREDITASI: A (Amat Baik)</strong></div></td>
  </tr>
  <tr>
    <td><div align="center"><em>Jl. Letnan Sayuti Kelurahan Kedaton Telp./Fax: (0712) 321223 Kayuagung</em></div></td>
  </tr>
  <tr>
    <td><div align="center"><em>Web Site: www.sman3-kag.sch.id  E-Mail: </em></div></td>
  </tr>
  <tr>
    <td><div align="center"></div></td>
  </tr>
  <tr>
    <td colspan="3"><div align="center">
      <p style="margin-bottom:0; margin-top:0"><strong>DATA CALON </strong><strong> SISWA BARU </strong></p>
<p style="margin-bottom:0; margin-top:0"><strong>TAHUN PELAJARAN 2012 - 2013</strong></p>
      <form action="" method="post" name="form1" id="form1">
        <table width="85%" border="0">
          <tr>
            <td bgcolor="#FFFF99"><strong>Data Pribadi</strong>
              <table width="100%" border="1" cellpadding="0" cellspacing="0">
                <tr>
                  <td><table width="100%" border="0">
                    <tr>
                      <td width="15%" align="left" valign="top">No. Registrasi</td>
                      <td width="3%" align="left" valign="top"><div align="center">:</div></td>
                      <td width="82%" align="left" valign="top"><input name="txtnoreg" type="text" id="txtnoreg" value="<?php echo $dataTampil['no_registrasi']; ?>" readonly="readonly" /></td>
                    </tr>
                    <tr>
                      <td align="left" valign="top">Nama Calon Siswa</td>
                      <td align="left" valign="top"><div align="center">:</div></td>
                      <td align="left" valign="top"><input name="txtcalonsiswa" type="text" id="txtcalonsiswa" size="50" readonly="readonly"/></td                     
                    ></tr>
                    <tr>
                      <td align="left" valign="top">Jenis Kelamin</td>
                      <td align="left" valign="top"><div align="center">:</div></td>
                      <td align="left" valign="top"><input name="txtjk" type="text" id="txtjk" readonly="readonly" /></td>
                    </tr>
                    <tr>
                      <td align="left" valign="top">Tempat Lahir</td>
                      <td align="left" valign="top"><div align="center">:</div></td>
                      <td align="left" valign="top"><input name="txttempatlahir" type="text" id="txttempatlahir" readonly="readonly" /></td>
                    </tr>
                    <tr>
                      <td align="left" valign="top">Tanggal Lahir</td>
                      <td align="left" valign="top"><div align="center">:</div></td>
                      <td align="left" valign="top"><input name="txttgllahir" type="text" id="txttgllahir" readonly="readonly" /></td>
                    </tr>
                    <tr>
                      <td align="left" valign="top">Alamat Calon Siswa</td>
                      <td align="left" valign="top"><div align="center">:</div></td>
                      <td align="left" valign="top"><table width="100%" border="0">
                        <tr>
                          <td colspan="3" align="left" valign="top"><textarea name="txtalamat" cols="50" rows="3" readonly="readonly" id="txtalamat"></textarea></td>
                          </tr>
                        <tr>
                          <td width="18%" align="left" valign="top">Hp / Telepon</td>
                          <td width="3%" align="left" valign="top"><div align="center">:</div></td>
                          <td width="79%" align="left" valign="top"><input name="txthp" type="text" id="txthp" onkeyup="checkNumber(this)" size="30" readonly="readonly"/>
                            /
                            <input name="txttelepon" type="text" id="txttelepon" onkeyup="checkNumber(this)" size="30" readonly="readonly"/> 
                            <em>*) Isi dengan Angka</em></td>
                        </tr>
                      </table></td>
                    </tr>
                    <tr>
                      <td align="left" valign="top">Asal SMP / MTs</td>
                      <td align="left" valign="top"><div align="center">:</div></td>
                      <td align="left" valign="top"><input name="txtasalsekolah" type="text" id="txtasalsekolah" size="70" readonly="readonly" /></td>
                    </tr>
                    <tr>
                      <td align="left" valign="top">&nbsp;</td>
                      <td align="left" valign="top">&nbsp;</td>
                      <td align="left" valign="top">&nbsp;</td>
                    </tr>
                  </table></td>
                </tr>
              </table></td>
          </tr>
          <tr>
            <td align="left" valign="top" bgcolor="#FFFF99"><strong>
              Orang Tua / Wali</strong>
              <table width="100%" border="1" cellpadding="0" cellspacing="0">
                <tr>
                  <td>              
              <table width="100%" border="0">
                <tr>
                  <td align="left" valign="top"><em>Ayah</em>
                    <table width="100%" border="0">
                      <tr>
                        <td width="16%">Nama  Ayah</td>
                        <td width="3%"><div align="center">:</div></td>
                        <td width="81%"><input name="txtnamaayah" type="text" id="txtnamaayah" size="30" readonly="readonly" /></td>
                      </tr>
                      <tr>
                        <td>Pekerjaan Ayah</td>
                        <td><div align="center">:</div></td>
                        <td><input name="txtkerjaayah" type="text" id="txtkerjaayah" size="35" readonly="readonly" /></td>
                      </tr>
                    </table></td>
                </tr>
                <tr>
                  <td align="left" valign="top"><em>Ibu</em>
                    <table width="100%" border="0">
                      <tr>
                        <td width="16%">Nama Ibu</td>
                        <td width="3%"><div align="center">:</div></td>
                        <td width="81%"><input name="txtnamaibu" type="text" id="txtnamaibu" size="30" readonly="readonly" /></td>
                      </tr>
                      <tr>
                        <td>Pekerjaan Ibu</td>
                        <td><div align="center">:</div></td>
                        <td><input name="txtkerjaibu" type="text" id="txtkerjaibu" size="35" readonly="readonly" /></td>
                      </tr>
                    </table></td>
                </tr>
                <tr>
                  <td><em>Wali           *) Diisi jika memiliki wali selain orang tua</em>
                    <table width="100%" border="0">
                      <tr>
                        <td width="16%">Nama Wali</td>
                        <td width="3%"><div align="center">:</div></td>
                        <td width="81%"><input name="txtnamawali" type="text" id="txtnamawali" size="30" readonly="readonly" /></td>
                      </tr>
                      <tr>
                        <td>Pekerjaan Wali</td>
                        <td><div align="center">:</div></td>
                        <td><input name="txtnkerjawali" type="text" id="txtnkerjawali" size="35" readonly="readonly" /></td>
                      </tr>
                  </table></td>
                </tr>
              </table>&nbsp;</td>
                </tr>
              </table></td>
          </tr>
          <tr>
            <td align="left" valign="top" bgcolor="#FFFF99">
              <strong>Raport dan Prestasi</strong>
              <table width="100%" border="1" cellpadding="0" cellspacing="0">
                <tr>
                  <td>Nilai Raport&nbsp;<em>*) Nilai yang dimasukkan nilai PPK (Kognitif)</em>
                    <table width="100%" border="1" cellpadding="0" cellspacing="0">
                      <tr>
                        <td><div align="center"><strong>Mata Pelajaran</strong></div></td>
                        <td><div align="center"><strong>Smt. 1</strong></div></td>
                        <td><div align="center"><strong>Smt. 2</strong></div></td>
                        <td><div align="center"><strong>Smt. 3</strong></div></td>
                        <td><div align="center"><strong>Smt. 4</strong></div></td>
                        <td><div align="center"><strong>Smt. 5</strong></div></td>
                        </tr>
                      <tr>
                        <td>Bahasa Indonesia</td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtbindosmt1" type="text" id="txtbindosmt1" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtbindosmt2" type="text" id="txtbindosmt2" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtbindosmt3" type="text" id="txtbindosmt3" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtbindosmt4" type="text" id="txtbindosmt4" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtbindosmt5" type="text" id="txtbindosmt5" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        </tr>
                      <tr>
                        <td>Bahasa Inggris</td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtbinggsmt1" type="text" id="txtbinggsmt1" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtbinggsmt2" type="text" id="txtbinggsmt2" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtbinggsmt3" type="text" id="txtbinggsmt3" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtbinggsmt4" type="text" id="txtbinggsmt4" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtbinggsmt5" type="text" id="txtbinggsmt5" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        </tr>
                      <tr>
                        <td>Matematika</td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtmtksmt1" type="text" id="txtmtksmt1" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtmtksmt2" type="text" id="txtmtksmt2" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtmtksmt3" type="text" id="txtmtksmt3" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtmtksmt4" type="text" id="txtmtksmt4" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtmtksmt5" type="text" id="txtmtksmt5" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        </tr>
                      <tr>
                        <td>I P A</td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtipasmt1" type="text" id="txtipasmt1" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtipasmt2" type="text" id="txtipasmt2" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtipasmt3" type="text" id="txtipasmt3" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtipasmt4" type="text" id="txtipasmt4" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtipasmt5" type="text" id="txtipasmt5" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        </tr>
                      <tr>
                        <td>I P S</td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtipssmt1" type="text" id="txtipssmt1" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtipssmt2" type="text" id="txtipssmt2" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtipssmt3" type="text" id="txtipssmt3" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtipssmt4" type="text" id="txtipssmt4" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        <td align="center" valign="top"><div align="center">
                          <input name="txtipssmt5" type="text" id="txtipssmt5" onkeyup="checkNumber(this)" size="5" maxlength="2" readonly="readonly"/>
                        </div></td>
                        </tr>
                    </table>                    &nbsp;</td>
                </tr>
                <tr>
                  <td height="273">Prestasi
                    <em>*) Diisi jika memiliki piagam dan prestasi</em> &nbsp;
                    <table width="100%" border="0">
                      <tr>
                        <td width="16%" align="left" valign="top">Olimpiade Sains</td>
                        <td width="1%"><div align="center">:</div></td>
                        <td colspan="3" align="left" valign="top"><input name="txtosn" type="text" id="txtosn" readonly="readonly" /></td>
                      </tr>
                      <tr>
                        <td align="left" valign="top">Kompetisi Bhs. Inggris / Bhs. Arab</td>
                        <td><div align="center">:</div></td>
                        <td colspan="3" align="left" valign="top"><input name="txtkoming" type="text" id="txtkoming" readonly="readonly" /></td>
                      </tr>
                      <tr>
                        <td align="left" valign="top">Piagam Per-orangan</td>
                        <td><div align="center">:</div></td>
                        <td colspan="3" align="left" valign="top"><input name="txtlomba1" type="text" id="txtlomba1" size="60" /></td>
                      </tr>
                      <tr>
                        <td align="left" valign="top">Piagam Lainnya</td>
                        <td align="center" valign="top"><div align="center">:</div></td>
                        <td colspan="3" align="left" valign="top"><table width="71%" border="1" cellpadding="0" cellspacing="0">
                          <tr>
                            <td width="5%" align="left" valign="top"><div align="center">No.</div></td>
                            <td width="95%" align="left" valign="top"><div align="center">Nama Kegiatan Lomba dan Juara</div></td>
                            </tr>
                          <tr>
                            <td align="right" valign="top"><div align="center">1.</div></td>
                            <td align="left" valign="top"><div align="left">
                              <input name="txtpiagam1" type="text" id="txtpiagam1" size="80" />
                            </div></td>
                            </tr>
                          <tr>
                            <td align="right" valign="top"><div align="center">2.</div></td>
                            <td align="left" valign="top"><div align="left">
                              <input name="txtpiagam2" type="text" id="txtpiagam2" size="80" />
                            </div></td>
                            </tr>
                          <tr>
                            <td align="right" valign="top"><div align="center">3.</div></td>
                            <td align="left" valign="top"><div align="left">
                              <input name="txtpiagam3" type="text" id="txtpiagam3" size="80" />
                            </div></td>
                            </tr>
                        </table></td>
                      </tr>
                      <tr>
                        <td align="left" valign="top">&nbsp;</td>
                        <td>&nbsp;</td>
                        <td width="15%" align="left" valign="top">&nbsp;</td>
                        <td width="22%" align="left" valign="top">&nbsp;</td>
                        <td width="46%" align="left" valign="top">&nbsp;</td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
          </tr>
          <tr>
            <td align="left" valign="top" bgcolor="#FFFF99"><div align="right">
              <input type="submit" name="button" id="button" value="CETAK FORM" />
            </div></td>
          </tr>
      </table>
      </form>
      <p>&nbsp;</p>
    </div></td>
  </tr>
</table>
</body>
</html>