Register now or log in to join your professional community.
<p><strong>Explain it in a brief or providing a source code for it is highly appreciable.</strong></p>
<html>
<head>
<metahttp-equiv="Content-Type"content="text/html; charset=utf-8"/>
<title>Comment box</title>
</head>
<body>
<center>
<formaction="commentindex.php"method="POST">
<table>
<tr><tdcolspan="2">Comment: </td></tr>
<tr><tdcolspan="5"><textareaname="comment"rows="10"cols="50"></textarea></td></tr>
<tr><tdcolspan="2"><inputtype="submit"name="submit"value="Comment"></td></tr>
</table>
</form>
<?php
mysql_connect("mysql host name","mysql user name","mysql password");
mysql_select_db("database name");
$comment=$_POST['comment'];
$submit=$_POST['submit'];
$dbLink=mysql_connect("host name", "mysql username", "mysql password");
if($submit)
{
if($name&&$comment)
{
$insert=mysql_query("INSERT INTO comment (comment) VALUES ('$comment') ");
echo"added success";
}
else
{
echo"please fill out all fields";
}
}
?>
</body>
</html>
hi njfjsjf sjndfjskn dknsadnskdn sndjsndsndnskjdnkasndks dnskdnksndnsdkdjsndjsndkjnskjndnj