Mam taki skrypcik. I jest oroblem ze wyswietla sie mi error ktorego nie jestem w stanie naprawic ;_;
ERROR:
Catchable fatal error: Object of class
mysqli_result could not be converted to
string in /home/u467256960/public_
html/home/new-topic/index.php on line
9
A tu skrypcik:
<?php include '../../config/index.php'; include '../../config/header.php'; $author = $_SESSION['login']; $title = $_POST['title']; $post = $_POST['post']; if($post){ $heh = $db->query("INSERT INTO topic (title , post , author , cat) VALUES ('$title' , '$post' , '$author' , '$cat')"); if($heh == true){ } } else { echo ' <form method="POST" action="?ok&cat='.$cat. '"> <input type="text" name="title" style="width: 100%;"/> <textarea name="post" style="width: 100%;"> </textarea> <input type="submit" value="QQ"/> </form>'; } ?>
Blagam o pomoc!!