PHP comment box

Hi! Im very new on php coding. id like to make a comment box, when i click a button it goes to a page for users to leave text, say there are 10 buttons on every page and each buttons leads to a different comment box. how can i do this? Pls help! :D

i don’t know what kind of help u need, so i’m have to be very vaugh:

  • first of all u need to design and setup the database. are u known to PHPMyAdmin? what are the 10 boxes associated to? is the rest of the site content coming from a DB already?
  • then u have to make the html. as i understood u links are better sulution for this than buttons (of cause u may design these links to look like buttons). they should transfet the comment box number (id from the db) with get, but may go to the same page: e.g.
  • then u have to make these links come from the DB (select and a loop)
  • after that u may start working on comments.php. if $_GET[‘action’] is ‘compose’ this file needs to display a form: e.g. <form action=coment.php?comment_id=42&action=add" method=“post”>
  • then u have to put fields in there e.g.: , or
  • if $_GET[‘action’] is ‘add’ u need to validate the posted data and make en insert into the DB. using the data from $_GET[‘comment_id’] and $_POST[‘comment’] $_POST[‘email’]

hope this helps to get started.
if u need more specific help plz ask again

Sponsor our Newsletter | Privacy Policy | Terms of Service