• 27-12-2018, 23:09:47
    #1
    Merhaba
    	echo '<script>setInterval(function(){ window.location.href="sonuc/'.$tc.'"; }, 1000);</script>';
    echo ile yazdırmak istediğim bu kodda url kısmında tek tırnakla çıkıyor tırnakları nasıl kaldırabilirim.

    sonuc/'11111111111'

    bu şekilde yazıyor. echodan sonra " ile başladım olmadı ' kaldırdım olmadı.
  • 27-12-2018, 23:14:07
    #2
    echo '<script>setInterval(function(){ window.location.href=' . "sonuc/" .$tc .' }, 1000);</script>';
    bu şekilde deneyin, editörde deneyemedim hatalı olabilir
  • 27-12-2018, 23:14:28
    #3
    echo "<script>setInterval(function(){ window.location.href='sonuc/$tc'; }, 1000);</script>";
  • 27-12-2018, 23:18:24
    #4
    godlessturtle0 adlı üyeden alıntı: mesajı görüntüle
    echo '<script>setInterval(function(){ window.location.href=' . "sonuc/" .$tc .' }, 1000);</script>';
    bu şekilde deneyin, editörde deneyemedim hatalı olabilir
    olmadı maalesef



    Misafir adlı üyeden alıntı: mesajı görüntüle
    echo "<script>setInterval(function(){ window.location.href='sonuc/$tc'; }, 1000);</script>";
    bunu denemiştim buda olmamıştı maalesef
  • 27-12-2018, 23:20:23
    #5
    cagatayturkmen adlı üyeden alıntı: mesajı görüntüle
    olmadı maalesef





    bunu denemiştim buda olmamıştı maalesef
    hocam localde denedim. sorunsuz. $tc gelen veriye dikkat edin.
  • 27-12-2018, 23:20:44
    #6
    Yazdığınız kodda bir problem yok aslında.
    Bunu da deneyebilirsiniz.
    https://pastebin.com/qiasX6cq
  • 27-12-2018, 23:21:44
    #7
    hocam $tc değişkeninden tırnaklar geliyor olabilir mi ?
  • 27-12-2018, 23:23:23
    #8
    Üyeliği durduruldu
    echo "<script>setInterval(function(){ window.location.href='sonuc/{$tc}'; }, 1000);</script>";
  • 27-12-2018, 23:24:49
    #9
    <?php require('../_class/config.php'); ?>
    <?php if(isset($_POST['frm']) and $_POST['frm']=='frmMessages'){
    	$ad = DB::control($_POST['ad'], 'text'); 
    	$soyad = DB::control($_POST['soyad'], 'text'); 
    	$sinif = DB::control($_POST['sinif'], 'text'); 
    	$okul = DB::control($_POST['okul'], 'text'); 
    	$tc = DB::control($_POST['tc'], 'text'); 
    	$veli_ad = DB::control($_POST['veli_ad'], 'text'); 
    	$veli_soyad = DB::control($_POST['veli_soyad'], 'text'); 
    	$veli_telefon = DB::control($_POST['veli_telefon'], 'text'); 
    	$link =  DB::control(DB::seo($_POST['tc']),'text');
    
    	$result = DB::insert("INSERT INTO messages(ad, soyad, sinif, okul, tc, veli_ad, veli_soyad, veli_telefon, link ) VALUES($ad, $soyad, $sinif, $okul, $tc, $veli_ad, $veli_soyad, $veli_telefon, $link)");
    	if($result){ 
    		echo '<div class="alert alert-success text-center clearfix"><i class="fa fa-check"></i> Başvurunuz tamamlanmıştır. Sınav giriş belgenizi almayı unutmayınız !</div>';
    	}else{
    		echo '<div class="alert alert-danger text-center clearfix"><i class="fa fa-times"></i> Bir hata oluştu!</div>';
    	
    	} 
    
       
    	echo "<script>setInterval(function(){ window.location.href='sonuc/$tc'; }, 1000);</script>";
    	 
    } ?>
    gelen tc bu şekilde