sorunu buldum sanırım comment değişkeni boş nedense sanırım wordwrap fonksiyonu çalışmadığından boş gidiyor mesajlar
şöyle deniyince $comment2 ve $comment 'i echo komutu ile yazdırdım ama comment2 yazıldığı halde comment değişkeni boş çıktı oysa php.net deki örnektekine göre yazılması gerek eğer comment2 değişkeni dolu ise sorun nerde acaba ?
$title2 = $_POST['title2'];
$comment2 = $_POST['comment2'];
$title = wordwrap($title2, 20, "<br />\n");
$comment = wordwrap($comment2, 20, "<br />\n");
$userinfo = $user->userinfo;
$title = 'My Profile';
$tpl->output_page ('profile');
}
else if ($_POST['do'] == 'comment')
{
if (empty($title2) || empty ($title2))
{
$message = 'Yorum eklemek icin forumu tamamen doldurmalisiniz.';
$tpl->output_page('error');
}
// ##### CHECK FOR file #####
$file_query = mysql_query ("SELECT * FROM files WHERE file_id = '" . intval ($_POST['file']) . "'");
if (mysql_num_rows ($file_query) == 0)
{
$message = 'You are attempting to add a comment to a file which does not exist.';
$tpl->output_page('error');
}
// ##### ADD COMMENT #####
$sorgu = ("INSERT INTO comments (title, comment, file_id, user_id, added) VALUES ('$title', '$comment', '" . intval ($_POST['file']) . "', '" . $user->user['user_id'] . "', '" . time() . "')");
$calistir = mysql_query ($sorgu) or die(mysql_error());
echo $sorgu;
echo $comment;
echo $comment2;Sanırım ben bu sorunu çözene kadar php'yi öğrenicem