Arama butonu
Bu konudaki kullanıcılar: 1 misafir
3
Cevap
454
Tıklama
0
Öne Çıkarma
Parse error: syntax error, unexpected '$insert_posts' (T_VARIABLE)
A
10 yıl (219 mesaj)
Teğmen
Konu Sahibi

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>";

}

}


}


?>

DH forumlarında vakit geçirmekten keyif alıyor gibisin ancak giriş yapmadığını görüyoruz.

Üye olduğunda özel mesaj gönderebilir, beğendiğin konuları favorilerine ekleyip takibe alabilir ve daha önce gezdiğin konulara hızlıca erişebilirsin.

Üye Ol Şimdi Değil





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