Hi, I am new to php and I am trying to edit one free comment script to fit my needs. The last thing left is to make a word wrapping in comment <div>. It musn't be hard but because I lack understanding in it i have failed to do it myself. I have tried to use many functions but any of them did a job. I must have used them in the wrong way. This is the link of full script code: Comment Form Script Tutorial (It's free too!)
Here is my code:
Any kind of answers are appreciated. Just don't ignore my post if u have something to say:)
Thanks in advance.
Here is my code:
Code:
echo " <link rel=\"stylesheet\" type=\"text/css\" href=\"comments.css\"/> "; $commentquery = mysql_query("SELECT * FROM comments WHERE tutorialid='$tutid' ORDER BY date DESC") or die(mysql_error()); $commentNum = mysql_num_rows($commentquery); echo "<div id=\"currentcomments\" class=\"submitcomment\"><h3 class=\"formtitle\">Comments</h3>\n"; echo "<p class=\"top\">Total: $commentNum (<a href=\"#post\" class=\"link\">comment</a>)</p>\n"; $number = mysql_num_rows($commentquery)+1; while($commentrow = mysql_fetch_row($commentquery)){ $number--; $commentbb = BBCode($commentrow[3]); $commentDate = formatDate($commentrow[4]); echo "<div class=\"commentbody\" id=\"$commentrow[0]\">\n <p>$commentbb</p>\n <p class=\"postedby\">"; if($commentrow[2]){ echo "<b class=\"name\">$commentrow[2]<b class=\"kb\">,</b></b>"; } echo "<b class=\"date\">$commentDate</b> | <b class=\"number\">#$number</b></p>\n \n</div>"; } echo "</div>"; }
Thanks in advance.
Comment