On my forums when a user post a reply I use javascript to help prevent double post from being made, my most active user on the forums post from a phone/sidekick and after every single post he makes, there is another post made from him automaticly that contains just the word "submit"

Any ideas what could cause this or better yet how to avoid it, the 2nd post has the same exact post time to as well

Here is the form that submits the reply

<form name="form1" method="post" action="config/process/process.forum.php">
<textarea name="reply" rows="9" cols="120" class="textBox"></textarea><input name="reply" type="submit" class="button" value="  Submit  " onclick="this.disabled=true;document.form1.submit()">
<input type="hidden" name="url" value="/index.php?p=forum.post.reply.topic&topic_id=2800&catid=9">
<input type="hidden" name="auto_id" value="">
<input type="hidden" name="topic_id" value="2800">
<input type="hidden" name="catid" value="9" >
</form>

here is the processing script

<?PHP
// reply to forum Topic
if($_POST['reply']!=NULL){
	$catid = $_POST['catid'];
	$topic_id = $_POST['topic_id'];
	$reply = $_POST['reply'];

$reply=trim(addslashes(stripslashes($reply)));
	//reply is empty so return error message
	if($reply==NULL){
		$_SESSION['sess_msg'] = 'Please enter Reply!';
		header("location: $url");
		exit;
	}

//lets update last post time
$sql='update friend_forum_topic set update_time=now(),lastid=' .$_SESSION['auto_id']. ' where forum_categry_id="' .$catid. '" and auto_id="' .$topic_id. '"';
executequery($sql);

//below 3  updates for for post count
//add + 1 to post count for this forum categroy
$sql = 'update friend_forum_categorymaster set posts=posts + 1 WHERE autoid="' .$catid. '"';
executequery($sql);
//add + 1 to post count for this forum topic
$sql = 'update friend_forum_topic set postcount=postcount + 1 WHERE auto_id="' .$topic_id. '"';
executequery($sql);
//add +1 to user forum post count
$sql2= 'update friend_reg_user set fposts=fposts + 1 WHERE auto_id="' .$_SESSION['auto_id']. '"';
executequery($sql2);

//if admin is posting we do not filter out myspace
if ($_SESSION['auto_id']!='1'){
	$reply=FilterHTML(myspace($reply));
}else{
	$reply=FilterHTML($reply);
}
$reply=lineBR($reply);

//finally post the actual reply message
$sql='insert into friend_forum_topic_reply  (topic_id,user_id,reply,submit_date) values("' .$topic_id. '","' .$_SESSION['auto_id']. '","' .$reply. '",now())';
$result=executequery($sql);

//redirect back to forum topic
$_SESSION['sess_msg'] = 'Your Forum Topic Reply Successfully Posted !';
header("location: $SITE_PATH?p=forum.topic&topic_id=$topic_id&catid=$catid");
exit;
}
?>

    It could possibly be a Javascript-related error. Try getting rid of the document.form1.submit() code in the onclick handler for your submit button (since it's pointless to have it).

      You may also want to add some server-side logic to throttle posts... like if the user has posted within the last 5 or 10 seconds then consider the post a duplicate and ignore it.

        Write a Reply...