Jump to content

Archived

This topic is now archived and is closed to further replies.

asian_male66

Duplicate Form Submission

Recommended Posts

Hi

I have a simple script which is used to process a form. However, when my form is submitted I always get two submissions = two emails!

Help!

<?php

if ($ac == 'reg1')
{
$email = $email;
$firstname = $firstname;
$surname = $surname;

$subject = "Registration Details";
$headers = "From: Registration";
$msg = "Send an email message";
mail($email, $subject, $msg, $headers);

$ac = "reg2";
include("ShowValidate.form");
}else
{
include("Register.form");
}
?>



HTML FORM:

Register.fom contains:

<form name="regform" onSubmit="return checkCheckBox(this)" method="post" action="Register.php">
<input type="hidden" name="ac" value="reg1">

Share this post


Link to post
Share on other sites
What is inside ShowValidate.form? as far as i can see all else looks fine

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.