Aspire
Koineks
  • 30-09-2010, 23:57:02
    #1
    1/2
    Aşağıdaki alanları zorunlu hale getirmek istiyorum bu konuda yardımcı olursanız çok sevinirim şimdiden teşekküler
    Ad, Soyad*
    E-mail*
    Telefon*
    Adres*
    Şehir*
    Bizi Nerden duydunuz ?*
    <?php
    include("baglanti.php");
    	if($_POST[kaydet]=="Kaydet"){
    	$adi=$_POST[adi];
    	$email=$_POST[email];
    	$telefon=$_POST[telefon];
    	$adres=$_POST[adres];
    	$sehir=$_POST[sehir];
    	$nerdenduydu=$_POST[nerdenduydu];
    	$hangimarkatv=$_POST[hangimarkatv];
    	$hangimarkauydu=$_POST[hangimarkauydu];
    	$hangimarkalnb=$_POST[hangimarkalnb];
    	$ozelnot=$_POST[ozelnot];
    	$sqlekle="insert into yayinevi(cebit2004Adi,email,telefon,yayineviAdresi,yayineviSehir,nerdenduydu,hangimarkatv,hangimarkauydu,hangimarkalnb,ozelnot) values('$adi','$email','$telefon','$adres','$sehir','$nerdenduydu','$hangimarkatv','$hangimarkauydu','$hangimarkalnb','$ozelnot')";
    	@mysql_query($sqlekle);
    	if(mysql_error()){
    		echo mysql_error();
    	} else {
    		echo "Kayit Edilmistir.";
    	}
    	}
    ?>
    
    <form name="form1" method="post" action="">
      <table width="550" border="0"><font color="red">Yıldızlı alanlar doldurulması Zorunlu Alanlardır.</font>
        <tr>
          <td width="400">Ad, Soyad<font color="red">*</font></td>
          <td width="298"><input name="adi" type="text" id="adi"></td>
        </tr>
            <tr>
          <td width="400">E-mail<font color="red">*</font></td>
          <td width="298"><input name="email" type="text" id="email"></td>
        </tr>
        <tr>
          <td>Telefon<font color="red">*</font></td>
          <td><input name="telefon" type="text" id="telefon"></td>
        </tr>
        <tr>
          <td>Adres<font color="red">*</font></td>
          <td><textarea name="adres" id="adres"></textarea></td>
        </tr>
        <tr>
          <td>Şehir<font color="red">*</font></td>
          <td><select name="sehir" id="sehir">
            <option value="0">Seçiniz</option> 
    <option value="1" >Adana</option> 
    <option value="4" >Ağrı</option> 
    <option value="2" >Adıyaman</option> 
    <option value="3" >Afyon</option> 
    <option value="68" >Aksaray</option> 
    <option value="5" >Amasya</option> 
    <option value="6" >Ankara</option> 
    <option value="7" >Antalya</option> 
    																		<option value="75" >Ardahan</option> 
    																		<option value="8" >Artvin</option> 
    																		<option value="9" >Aydın</option> 
    																		<option value="10" >Balıkesir</option> 
    																		<option value="74" >Bartın</option> 
    																		<option value="72" >Batman</option> 
    																		<option value="69" >Bayburt</option> 
    																		<option value="11" >Bilecik</option> 
    																		<option value="12" >Bingol</option> 
    																		<option value="13" >Bitlis</option> 
    																		<option value="14" >Bolu</option> 
    																		<option value="15" >Burdur</option> 
    																		<option value="16" >Bursa</option> 
    																		<option value="17" >Çanakkale</option> 
    																		<option value="18" >Çankırı</option> 
    																		<option value="19" >Çorum</option> 
    																		<option value="20" >Denizli</option> 
    																		<option value="21" >Diyarbakır</option> 
    																		<option value="81" >Düzce</option> 
    																		<option value="22" >Edirne</option> 
    																		<option value="23" >Elazığ</option> 
    																		<option value="24" >Erzincan</option> 
    																		<option value="25" >Erzurum</option> 
    																		<option value="26" >Eskişehir</option> 
    																		<option value="27" >Gaziantep</option> 
    																		<option value="28" >Giresun</option> 
    																		<option value="29" >Gümüşhane</option> 
    																		<option value="30" >Hakkari</option> 
    																		<option value="31" >Hatay</option> 
    																		<option value="76" >Iğdır</option> 
    																		<option value="32" >Isparta</option> 
    																		<option value="46" >Kahramanmaraş</option> 
    																		<option value="78" >Karabük</option> 
    																		<option value="70" >Karaman</option> 
    																		<option value="36" >Kars</option> 
    																		<option value="37" >Kastamonu</option> 
    																		<option value="38" >Kayseri</option> 
    																		<option value="79" >Kilis</option> 
    																		<option value="41" >Kocaeli</option> 
    																		<option value="42" >Konya</option> 
    																		<option value="39" >Kırklareli</option> 
    																		<option value="71" >Kırıkkale</option> 
    																		<option value="40" >Kırşehir</option> 
    																		<option value="43" >Kütahya</option> 
    																		<option value="44" >Malatya</option> 
    																		<option value="45" >Manisa</option> 
    																		<option value="47" >Mardin</option> 
    																		<option value="48" >Muğla</option> 
    																		<option value="49" >Muş</option> 
    																		<option value="50" >Nevşehir</option> 
    																		<option value="51" >Niğde</option> 
    																		<option value="52" >Ordu</option> 
    																		<option value="80" >Osmaniye</option> 
    																		<option value="53" >Rize</option> 
    																		<option value="54" >Sakarya</option> 
    																		<option value="55" >Samsun</option> 
    																		<option value="56" >Siirt</option> 
    																		<option value="57" >Sinop</option> 
    																		<option value="58" >Sivas</option> 
    																		<option value="59" >Tekirdağ</option> 
    																		<option value="60" >Tokat</option> 
    																		<option value="61" >Trabzon</option> 
    																		<option value="62" >Tunceli</option> 
    																		<option value="64" >Uşak</option> 
    																		<option value="65" >Van</option> 
    																		<option value="77" >Yalova</option> 
    																		<option value="33" >İçel</option> 
    																		<option value="66" >Yozgat</option> 
    																		<option value="34" >İstanbul</option> 
    																		<option value="35" >İzmir</option> 
    																		<option value="67" >Zonguldak</option> 
    																		<option value="63" >Şanlıurfa</option> 
    																		<option value="73" >Şırnak</option>
          </select></td>
        </tr>
       <tr>
          <td>Bizi Nerden duydunuz ?<font color="red">*</font></td><br>
          <td><input name="nerdenduydu" type="text" id="nerdenduydu"></td>
        </tr>
        <tr>
          <tr>
          <td>Hangi Marka Tv(ler) Kullanıyorsunuz ?</td>
          <td><input name="hangimarkatv" type="text" id="hangimarkatv"></td>
        </tr>
        <tr>
          <tr>
          <td>Hangi Marka Uydu Alıcıları Kullanıyorsunuz ?</td>
          <td><input name="hangimarkauydu" type="text" id="hangimarkauydu"></td>
        </tr>
        <tr>
          <tr>
          <td>Hangi Marka LNB(ler) Kullanıyorsunuz ?</td>
          <td><input name="hangimarkalnb" type="text" id="hangimarkalnb"></td>
        </tr>
        <tr>
          <td>İletmek İstediğiniz özel Bir Not</td>
          <td><textarea name="ozelnot" id="ozelnot"></textarea></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td><input name="kaydet" type="submit" id="kaydet" value="Kaydet"></td>
        </tr>
        <p>
    <object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="580" height="100">
    	<param name="movie" value="Movie1.swf">
    	<param name="quality" value="High">
    	<embed src="Movie1.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="580" height="100"></object>
    </p>
    
      </table>
    </form>
  • Sponsor Reklam
  • 01-10-2010, 00:10:42
    #2
    1/2
    konu açmadan önce arama yapın
    if else
  • 01-10-2010, 00:15:41
    #3
    1/2
    Aşağıdaki örnek mantığı anlamanda yardımcı olacaktır.

    PHP- Kodu:
    $adsoyad $_GET['adsoyad'];
    $email $_GET['email'];
    $tel $_GET['tel'];
    $mesaj $_GET['mesaj'];
    if (
    $adsoyad=="" || $email=="" || $tel=="" || $mesaj==""){
        echo 
    "Lütfen formda eksik alan bırakmayınız."; } 
  • 01-10-2010, 00:40:34
    #4
    1/2
    webkarizma adlı üyeden alıntı
    Aşağıdaki örnek mantığı anlamanda yardımcı olacaktır.

    PHP- Kodu:
    $adsoyad $_GET['adsoyad'];
    $email $_GET['email'];
    $tel $_GET['tel'];
    $mesaj $_GET['mesaj'];
    if (
    $adsoyad=="" || $email=="" || $tel=="" || $mesaj==""){
        echo 
    "Lütfen formda eksik alan bırakmayınız."; } 
    Teşekkürler.