Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,163,523 members, 7,854,251 topics. Date: Saturday, 08 June 2024 at 01:13 PM

Comment Box [HTML] Code - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Comment Box [HTML] Code (643 Views)

Get Rid Of Blogger Comment Box In Exchange For A Guest Post / Top 5 Comment Box Systems Bloggers Can Use (2) (3) (4)

(1) (Reply)

Comment Box [HTML] Code by Nobody: 10:41pm On May 15, 2016
I known many of us here i eager to design a site and u want it to look nice so i give to you my handsome comment box (lolz) here u go.




<?php
mysql_connect("mysql host name","mysql user name","mysql password"wink;
mysql_select_db("database name"wink;
$name=$_POST['name'];
$comment=$_POST['comment'];
$submit=$_POST['submit'];

$dbLink = mysql_connect("mysql host name", "mysql user name", "mysql password"wink;
mysql_query("SET character_set_client=utf8", $dbLink);
mysql_query("SET character_set_connection=utf8", $dbLink);

if($submit)
{
if($name&&$comment)
{
$insert=mysql_query("INSERT INTO comment (name,comment) VALUES ('$name','$comment') "wink;
echo "<meta HTTP-EQUIV='REFRESH' content='0; url=commentindex.php'>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Comment box</title>
</head>

<body>
<center>
<form action="commentindex.php" method="POST">
<table>
<tr><td>Name: <br><input type="text" name="name"/></td></tr>
<tr><td colspan="2">Comment: </td></tr>
<tr><td colspan="5"><textarea name="comment" rows="10" cols="50"></textarea></td></tr>
<tr><td colspan="2"><input type="submit" name="submit" value="Comment"></td></tr>
</table>
</form>

<?php
$dbLink = mysql_connect("mysql host name", "mysql username", "mysql password"wink;
mysql_query("SET character_set_results=utf8", $dbLink);
mb_language('uni');
mb_internal_encoding('UTF-8');

$getquery=mysql_query("SELECT * FROM comment ORDER BY id DESC"wink;
while($rows=mysql_fetch_assoc($getquery))
{
$id=$rows['id'];
$name=$rows['name'];
$comment=$rows['comment'];
echo $name <br/><br/>ALL COMMENTS<br/><br/><hr size="1"/>

</body>
</html>
Re: Comment Box [HTML] Code by Nobody: 10:50pm On May 15, 2016
looks nice! smiley

Re: Comment Box [HTML] Code by emmausa0106: 8:31am On Jul 01, 2023
I am happy to be able to share with everyone my insights slither io in this field. Hopefully we can complement each other's missing knowledge.

(1) (Reply)

3 Writers Needed In A Tech Blog / Please Help Review My Site / Lacets-elastiques-3mm

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 10
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.