Şimdi Ara

Parse error: syntax error, unexpected '$insert_posts' (T_VARIABLE)

Daha Fazla
Bu Konudaki Kullanıcılar: Daha Az
2 Misafir - 2 Masaüstü
5 sn
4
Cevap
0
Favori
449
Tıklama
Daha Fazla
İstatistik
  • Konu İstatistikleri Yükleniyor
Öne Çıkar
0 oy
Sayfa: 1
Giriş
Mesaj
  • Arkadaşlar kodlama konusunda yeniyim. Admin paneli hszırlarken başlıktaki hatayı alıyorum. Çözümünü bir türlü bulamadım nerede hata yapıyor olabilirim ? (kodlama yaparken eğitim videosundan yararlanıyorum) 127. satırda yani bold ile işaretlediğim yerde hata gözüküyor. Var mıdır bir üstad bunu çözebilecek?

    Yazdığım kodlar aşağıdaki gibidir.




    <?php
    if(isset($_POST['submit'])) {

    $post_title = $_POST['post_title'];
    $post_date = date('m-d-y');
    $post_cat = $_POST['cat'];
    $post_author = $_POST['post_author'];
    $post_keywords = $_POST['post_keywords'];
    $post_image = $_FILES['post_image']['name'];
    $post_image_tmp = $_FILES['post_image']['tmp_name'];
    $post_content = $_POST['post_content'];

    if ($post_title=='' OR $post_cat=='null' OR $post_author=='' OR $post_keywords=='' OR $post_image=='' OR $post_content=='') {


    echo "<script>alert('Please fill in all the fields')</script>";
    exit();
    }
    else {
    move_uploaded_file($post_image_tmp,"news_images/$post_image")
    $insert_posts = "insert into posts (category_id,post_title,post_date,post_author,post_keywords,post_image,post_content) values ('$post_cat','$post_title','$post_date','$post_author','$post_keywords','$post_image','$post_content')";

    $run_posts = mysql_query($insert_posts);
    if(mysql_query($run_posts)) {

    echo "<script>alert('Post has been published!'"</script>;
    echo "<script>window.open('insert_post.php','self')</script>";

    }

    }


    }


    ?>



    < Bu mesaj bu kişi tarafından değiştirildi akilyolu. -- 6 Aralık 2015; 23:28:30 >



    _____________________________




  • move_uploaded_file($post_image_tmp,"news_images/$post_image");

    Sonunda noktalı virgül eksikmiş herhalde?
    _____________________________

    İstikbal
  • quote:

    Orijinalden alıntı: nihattr

    move_uploaded_file($post_image_tmp,"news_images/$post_image");

    Sonunda noktalı virgül eksikmiş herhalde?

    Dönüşün için çok teşekkürler, belirttiğin şekilde yaptım fakat farklı bir hata aldım bu sefer :(


    Çıkan hata aşağıdaki gibidir.


    Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\MyCMS2\admin\insert_post.php on line 145
    _____________________________
  • quote:

    Orijinalden alıntı: nihattr

    move_uploaded_file($post_image_tmp,"news_images/$post_image");

    Sonunda noktalı virgül eksikmiş herhalde?

    Süpersin ya farkedememişim oldu şuanda :) Diğer hatayı da düzelttim.
    _____________________________
  • Yapay Zeka’dan İlgili Konular
    Wait for PADO timeout hatasi
    16 yıl önce açıldı
    Daha Fazla Göster
    
Sayfa: 1
- x
Bildirim
mesajınız kopyalandı (ctrl+v) yapıştırmak istediğiniz yere yapıştırabilirsiniz.