<html>
<head>
<title>Register</title>
</head>
<body>
<h3>Add item</h3>
<form action="" method="POST">
Item name: <input type="text" name="user"><br />
Item Description: <textarea name="comment" id="comment" type="text"></textarea><br />
<input type="submit" value="Submit" />
</form>
<?php
if(isset($_POST["submit"])){
if(!empty($_POST['user']) && !empty($_POST['comment'])) {
$user=$_POST['user'];
$com=$_POST['comment'];
$con=mysql_connect('127.0.0.1','root','') or die(mysql_error());
mysql_select_db('ocp') or die("cannot select DB");
$query=mysql_query("SELECT * FROM itemtbl WHERE itemname='".$user."'");
$numrows=mysql_num_rows($query);
if($numrows==0)
{
$sql="INSERT INTO itemtbl(itemname,itemdesc) VALUES('$user','$com')";
$result=mysql_query($sql);
I've named my text area as 'comment' and now I don't know whats wrong. It keeps bringing me back to the original form
DONT MIND THE TITLE I've edited my reg form earlier to see what wrong, but the problem persists.