• 10-02-2010, 00:03:01
    #1
    Merhaba arkadaşlar 2 gündür uğraşıyorum işin içinden çıkamadım yardımlarınızı bekliyorum.

    <?php
    require_once('ayarlar.inc.php');
    ?>
    <!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" dir="ltr" lang="tr-TR">
    <head profile="http://gmpg.org/xfn/11">
    <title>...</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="robots" content="index, follow" />
    <meta http-equiv="Content-Language" content="tr" />
    <meta name="author" content="" />
    <link rel="stylesheet" href="style.css" type="text/css" media="screen" />
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
        $('#sehirler').change(function(){
            var sehir = $("#sehirler option:selected").attr('value');
            if (sehir != '') {
                $('#ilceler').load('verial.php?temizle=true');
                $('#ilceler').load('verial.php?sehir='+sehir);
                $('#mahalleler').load('verial.php?temizle=true&tip=mahalle');
            }else{
                $('#ilceler').load('verial.php?temizle=true&tip=ilce');
                $('#mahalleler').load('verial.php?temizle=true&tip=mahalle');
            }
        });
        $('#ilceler').change(function(){
            var ilce = $("#ilceler option:selected").attr('value');
            if (ilce != '') {
                $('#mahalleler').load('verial.php?temizle=true');
                $('#mahalleler').load('verial.php?ilce='+ilce);
            }else{
                $('#mahalleler').load('verial.php?temizle=true&tip=mahalle');
            }
        });
    });
    </script>
    </head>
    <body>
    
    <div id="kapsayici">
        
        <div id="secim">
            <select name="sehirler" id="sehirler">
                <option value="">-- Şehir seçiniz</option>
                <?php
                $sehirler = $db -> rows("SELECT * FROM ".DB_TFIX."sehirler ORDER BY isim ASC");
                if ($sehirler) {
                    foreach($sehirler as $sehir) {
                        echo '<option value="'.$sehir -> id.'">'.stripslashes($sehir -> isim).'</option>';
                    }
                }
                ?>
            </select><select name="ilceler" id="ilceler">
                <option value="">-- Önce şehir seçiniz</option>
            </select><select name="mahalleler" id="mahalleler">
                <option value="">-- Önce ilçe seçiniz</option>
            </select>
        </div>
    
    </div>
    
    </body>
    </html>
    burda açılır kutu var
    il/ilçe/mahalle şeklinde. il seçince ilçeler çıkıyor ilçe seçince mahalle çıkıyor. buradan yapmak istediğim alta submit koyup tıklandığında iladı-ilceadı-mahalle.php şeklinde link yapmak istiyorum
    adana-kozan-mahmutlu.php gibi.
  • 10-02-2010, 00:12:03
    #2
    Üyeliği durduruldu
    bu daha cok javascript sorusu. jquery ile alirken val degeri ile alabilirsiniz $('#ilceler').val(); gibi