ඔය පහලින් තියෙන කෝඩ් එකේ හිස් ( empty ) පොස්ට් යන එක නවත්තන්නේ කොහොදම කියලා පොඩ්ඩක් කියලා දෙන්න...
HTML:
<?php
if(isset($_SESSION['email'])==true){
}
if(isset($_POST['sav'])){
//text field
$name= $_POST['name'];
$comment= $_POST['comment'];
if (strlen($comment)=="")
{
echo "Enter Your Details";
}
$username="lanka_com";
$hostname="localhost";
$password="147147";
$con=mysql_connect($hostname,$username,$password);
echo "Thank You " . $name;
$select=mysql_select_db("lanka_comment",$con);
{
$result=mysql_query("INSERT INTO comment (name,comment) VALUES ('$name', '$comment')");
}
mysql_close($con);
}
?>

