mysql - Comments to every post (PHP) -


sorry if being such noob!

i'm working on blog page posts. have set cms can create new posts (with following method..)

if(isset($_post['submit'])) {     if(isset($_post['postname'])) {         if(isset($_post['postcontent'])) {             addpost($_post['postname'],$_post['postauth'],$_post['postcontent'],$_post['postcats'],$_post['postday'],$_post['postmonth'],$_post['postyear'],$_post['postimage'],$post_count);             header("location: addpost.php");           } else { "text empty";          }      } else {         echo "title empty";         include('back1.php');      }  } else {     header("location: back2.php"); } 

function addpost($pname, $pauth, $pcontent, $pcat = 1, $pday, $pmonth, $pyear, $pimage) {       $query = mysql_query("insert posts               values(null,'$pname','$pauth',                     '$pcontent','$pcat',                     '$pday','$pmonth',                     '$pyear','$pimage')") or die(mysql_error());  } 

however, want unique comment field every post.

i know how set form that post details mysql, , function view on page. method should use if want unique comment field every post? since can't have same table etc...

you should add hidden field containing id of post comment form.


Comments

Popular posts from this blog

mod rewrite - Using "?" when rewriting the URL -

.htaccess: Transfer name to index.php if not directory public -

Admob integration with pygame in android -