Zorunlı alan

Anemon

New member
Katılım
17 Ocak 2006
Mesajlar
106
Reaction score
0
Puanları
0
Yaş
38
Kod:
<form id="test" action="#" method="post">
  <table width="100%" border="0" align="center" cellpadding="1" cellspacing="1">
                                      <tr>
                                        <td width="12%" nowrap class="rowh1"><font color="#FF0000">(*) </font>Teslim Edilecek Il : </td>
                                        <td width="88%" class="row1">
										  <select name="t_sehir" id="t_sehir">
											<option value="0">Lütfen Il Seçiniz</option>

											
											<option value="Adana" >Adana</option>
											
											<option value="Adiyaman" >Adiyaman</option>
											
											<option value="Afyon" >Afyon</option>
											
											<option value="Agri" >Agri</option>
											
											<option value="Aksaray" >Aksaray</option>
											
											<option value="Amasya" >Amasya</option>

											
											<option value="Ankara" >Ankara</option>
											
											<option value="Antalya" >Antalya</option>
											
											<option value="Ardahan" >Ardahan</option>
											
											<option value="Artvin" >Artvin</option>
											
											<option value="Aydin" >Aydin</option>
											
											<option value="Balikesir" >Balikesir</option>

											
											<option value="Bartin" >Bartin</option>
											
											<option value="Batman" >Batman</option>
											
											<option value="Bayburt" >Bayburt</option>
											
											<option value="Bilecik" >Bilecik</option>
											
											<option value="Bingol" >Bingol</option>
											
											<option value="Bitlis" >Bitlis</option>

											
											<option value="Bolu" >Bolu</option>
											
											<option value="Burdur" >Burdur</option>
											
											<option value="Bursa" >Bursa</option>
											
											<option value="Canakkale" >Canakkale</option>
											
											<option value="Cankiri" >Cankiri</option>
											
											<option value="Corum" >Corum</option>

											
											<option value="Denizli" >Denizli</option>
											
											<option value="Diyarbakir" >Diyarbakir</option>
											
											<option value="Duzce" >Duzce</option>
											
											<option value="Edirne" >Edirne</option>
											
											<option value="Elazig" >Elazig</option>
											
											<option value="Erzincan" >Erzincan</option>

											
											<option value="Erzurum" >Erzurum</option>
											
											<option value="Eskisehir" >Eskisehir</option>
											
											<option value="Gaziantep" >Gaziantep</option>
											
											<option value="Giresun" >Giresun</option>
											
											<option value="Gumushane" >Gumushane</option>
											
											<option value="Hakkari" >Hakkari</option>

											
											<option value="Hatay" >Hatay</option>
											
											<option value="Icel" >Icel</option>
											
											<option value="Igdir" >Igdir</option>
											
											<option value="Isparta" >Isparta</option>
											
											<option value="Istanbul" >Istanbul</option>
											
											<option value="Izmir" selected="selected">Izmir</option>

											
											<option value="Kahramanmaras" >Kahramanmaras</option>
											
											<option value="Karabuk" >Karabuk</option>
											
											<option value="Karaman" >Karaman</option>
											
											<option value="Kars" >Kars</option>
											
											<option value="Kastamonu" >Kastamonu</option>
											
											<option value="Kayseri" >Kayseri</option>

											
											<option value="Kilis" >Kilis</option>
											
											<option value="Kirikkale" >Kirikkale</option>
											
											<option value="Kirklareli" >Kirklareli</option>
											
											<option value="Kirsehir" >Kirsehir</option>
											
											<option value="Kocaeli" >Kocaeli</option>
											
											<option value="Konya" >Konya</option>

											
											<option value="Kutahya" >Kutahya</option>
											
											<option value="Malatya" >Malatya</option>
											
											<option value="Manisa" >Manisa</option>
											
											<option value="Mardin" >Mardin</option>
											
											<option value="Mugla" >Mugla</option>
											
											<option value="Mus" >Mus</option>

											
											<option value="Nevsehir" >Nevsehir</option>
											
											<option value="Nigde" >Nigde</option>
											
											<option value="Ordu" >Ordu</option>
											
											<option value="Osmaniye" >Osmaniye</option>
											
											<option value="Rize" >Rize</option>
											
											<option value="Sakarya" >Sakarya</option>

											
											<option value="Samsun" >Samsun</option>
											
											<option value="Sanliurfa" >Sanliurfa</option>
											
											<option value="Siirt" >Siirt</option>
											
											<option value="Sinop" >Sinop</option>
											
											<option value="Sirnak" >Sirnak</option>
											
											<option value="Sivas" >Sivas</option>

											
											<option value="Tekirdag" >Tekirdag</option>
											
											<option value="Tokat" >Tokat</option>
											
											<option value="Trabzon" >Trabzon</option>
											
											<option value="Tunceli" >Tunceli</option>
											
											<option value="Usak" >Usak</option>
											
											<option value="Van" >Van</option>

											
											<option value="Yalova" >Yalova</option>
											
											<option value="Yozgat" >Yozgat</option>
											
											<option value="Zonguldak" >Zonguldak</option>
											
										  </select><label id="citymsj" class="mesajs"></label>
										  <label id="cargomsj" class="mesajs"></label>
							  		   </td>

                                      </tr>
                                      <tr>
                                        <td nowrap class="rowh1"><font color="#FF0000">(*) </font>Alici : </td>
                                        <td width="88%" class="row1"><input name="t_al" type="text" id="t_al" value="" size="30" maxlength="100">
                                        <label id="namemsj" class="mesajs"></label></td>
                                      </tr>
                                      <tr>
                                        <td valign="top" nowrap class="rowh2"><font color="#FF0000">(*)</font> Adres : </td>

                                        <td class="row2"><textarea name="t_adres" cols="30" rows="5" id="t_adres"></textarea>
                                        <br><label id="adresmsj" class="mesajs"></label></td>
                                      </tr>
                                      <tr>
                                        <td nowrap class="rowh1">Firma : </td>
                                        <td width="88%" class="rowh1"><input name="t_firma" type="text" id="t_firma" value="" size="30" maxlength="100"></td>
                                      </tr>
                                      <tr>

                                        <td nowrap class="rowh2">Alternatif Alici : </td>
                                        <td class="row2"><input name="t_alici" type="text" id="t_alici" value="" size="30" maxlength="50"></td>
                                      </tr>
                                      <tr>
                                        <td nowrap class="rowh1"><font color="#FF0000">(*)</font> E-Posta : </td>
                                        <td class="row1"><input name="t_mail" type="text" id="t_mail" value="" size="30" maxlength="50">
                                        <label id="mailmsj" class="mesajs"></label></td>

                                      </tr>
                                      <tr>
                                        <td nowrap class="rowh2"><font color="#FF0000">(*)</font> Telefon #1 : </td>
                                        <td class="row2"><input name="t_tel" type="text" id="t_tel" value="" size="30" maxlength="30">
                                        <label id="telmsj" class="mesajs"></label></td>
                                      </tr>
                                      <tr>
                                        <td nowrap class="rowh1">Fax  #2 : </td>

                                        <td class="row1"><input name="t_fax" type="text" id="t_fax" value="" size="30" maxlength="30"></td>
                                      </tr>
                                      <tr>
                                        <td nowrap class="rowh2">Semt : </td>
                                        <td class="row2"><input name="t_state" type="text" id="t_state" value="" size="30" maxlength="30"></td>
                                      </tr>
									    <tr>
                                        <td nowrap class="rowh2">Almak istediğiniz Ürün </td>
                                        <td class="row2"><select name="t_urun" id="t_urun">
											<option value="0">Lütfen Ürünü Seçiniz</option>

											<option value="Gold Shape Firming Cream" >Gold Shape Firming Cream</option>
											<option value="Gold Shape Slimming Face" >Gold Shape Slimming Face</option>
											<option value="Nature's Way" >Nature's Way</option>
											<option value="Sea Clay" >Sea Clay</option>
										  </select></td>
                                      </tr>
</table></td>
                              </tr>

                            </table></td>
                            <td valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                              <tr>
                                <td><table width="100%" border="0" cellpadding="0" cellspacing="0" background="">
                                    <tr>
                                      <td width="100%" class="join_sub"><b>:: Fatura Bilgileri ::</b></td>
                                    </tr>
                                  </table>

                                    <table width="100%" border="0" align="center" cellpadding="1" cellspacing="1">
                                      <tr>
                                        <td class="row2" colspan="2">
										<a href="JavaScript:;" onClick="_Copy()"></a></td>
                                      </tr>
                                      <tr>
                                        <td width="12%" nowrap class="rowh1">Ad & Soyad : </td>

                                        <td width="88%" class="row1"><input name="f_name" type="text" id="f_name" value="" size="30" maxlength="100"></td>
                                      </tr>
                                      <tr>
                                        <td valign="top" nowrap class="rowh2">Adres : </td>
                                        <td class="row2"><textarea name="f_adr" cols="30" rows="5" id="f_adr"></textarea></td>
                                      </tr>
                                      <tr>
                                        <td nowrap class="rowh1">Firma : </td>

                                        <td width="88%" class="rowh1"><input name="f_firma" type="text" id="f_firma" value="" size="30" maxlength="100"></td>
                                      </tr>
                                      <tr>
                                        <td nowrap class="rowh2">Vergi Dairesi : </td>
                                        <td class="row2"><input name="f_daire" type="text" id="f_daire" size="30" maxlength="50"></td>
                                      </tr>
                                      <tr>
                                        <td nowrap class="rowh1">Vergi No : </td>

                                        <td class="row1"><input name="f_daireno" type="text" id="f_daireno" size="30" maxlength="30" /></td>
                                      </tr>
                                      <tr>
                                        <td nowrap class="rowh2">Sehir : </td>
                                        <td class="row2"><input name="f_city" type="text" id="t_city" size="30" maxlength="30"></td>
                                      </tr>
                                      <tr>
                                        <td nowrap class="rowh2">Telefon #1 : </td>

                                        <td class="row2"><input name="f_tel" type="text" id="f_tel" value="" size="30" maxlength="30"></td>
                                      </tr>
                                  </table></td>
                              </tr>
                            </table></td>
                          </tr>
                          <tr>
                            <td height="30" colspan="2" align="right" class="rowh2">
							  <label id="codemsj" class="mesajs"></label>
<input name="submit" type="submit" class="dogru" value="gonder" />
                <input name="Reset" type="reset" class="dogru" value="Temizle" />			</form>		     
				
				<script type="text/javascript">
			var dogru = new Dogrulama('test');</script>
              <?
		if($_POST['submit']){
		
		
		
				$kime = "*****";
				$konu .= "Siparis Formu PTT";

$t_sehir = $_REQUEST['t_sehir'] ;

$t_al = $_REQUEST['t_al'] ;

$t_adres = $_REQUEST['t_adres'];

$t_firma = $_REQUEST['t_firma'];

$t_alici = $_REQUEST['t_alici'] ;

$t_mail = $_REQUEST['t_mail'];

$t_tel = $_REQUEST['t_tel'];

$t_fax = $_REQUEST['t_fax'];

$t_state = $_REQUEST['t_state'];

$t_urun = $_REQUEST['t_urun'];

$f_name = $_REQUEST['f_name'];

$f_adr = $_REQUEST['f_adr'];

$f_firma = $_REQUEST['f_firma'];

$f_daire = $_REQUEST['f_daire'];

$f_daireno = $_REQUEST['f_daireno'];

$f_city = $_REQUEST['f_city'];

$f_tel = $_REQUEST['f_tel'];

$header .= "From: Siparis Formu Havale <$email>\n";

$header .= "Content-Type: text/html; charset=windows-1254";

$gonder = "
<table>
  <tr>
    <td>Teslim Edilicek Adres</td>
    <td >$t_sehir</td>
  </tr>
  <tr>
    <td>Alici:</td>
    <td>$t_al</td>
  </tr>
  <tr>
    <td>Adres: </td>
    <td>$t_adres</td>
  </tr>
  <tr>
    <td>Firma</td>
    <td>$t_firma</td>
  </tr>
    <tr>
    <td>Alternatif Alici :</td>
    <td>$t_alici</td>
  </tr>
      <tr>
    <td>E-Posta:</td>
    <td>$t_mail</td>
  </tr>
      <tr>
    <td>Telefon :</td>
    <td>$t_tel</td>
  </tr>
      <tr>
    <td>Fax :</td>
    <td>$t_fax</td>
  </tr>
      <tr>
    <td>Semt:</td>
    <td>$t_state</td>
  </tr>
      <tr>
    <td>Almak istedigi urun:</td>
    <td>$t_urun</td>
  </tr>
      <tr>
    <td>Ad Soyad:</td>
    <td>$f_name</td>
  </tr>
      <tr>
    <td>Adres:</td>
    <td>$f_adr</td>
  </tr>
      <tr>
    <td>Firma:</td>
    <td>$f_firma</td>
  </tr>
      <tr>
    <td>Vergi Dairesi:</td>
    <td>$f_daire</td>
  </tr>
  <tr>
    <td>Vergi NO:</td>
    <td>$f_daireno</td>
  </tr>
  <tr>
    <td>Sehir:</td>
    <td>$f_city</td>
  </tr>
  <tr>
    <td>Telefon:</td>
    <td>$f_tel</td>
  </tr>
</table>
";

$sent = mail($kime, $konu, $gonder, $header);

if($sent)
{print  "Mesajiniz Gönderildi!"; }
else
{print "Mesajiniz Gönderilemedi!"; }

}
		
		?>
Ben Böyle birşey yaptım fakat burdaki bazı alanların zorunlu olmasını istiyorum... Zorunlu alanlar doldurulmamışsa gönder button'una bastığı zaman Lütfen Boş bırakılan Yerleri Doldurun diye bir mesaj çıksın. Hepsi doluysa direk gönder dediği zmn göndersin nasıl yapabilirim?
 
Geri
Üst