Hi,
I'm using formmail for a while now and never had any problems until now.
I have two forms. The first form the client has to fill in and click the submit button. All the data of the first form has been send to the second form where all the textfields are disabled.
The values of the second form are filled in with php :
<?php print $_POST["name_textfield_of_the_first_form"]; ?>
When this form appears to be ok, the client clicks submit again.
Here it goes wrong. I always get the following error:
The following error occurred in FormMail :
no_recipients
**********
Error=The form has an internal error - no actions or recipients were specified.
To fill in a form the client has to login first.
Here you find my form (offerte.php):
Code:
<form action="offerte2.php" method="post">
Firma<br />
<input name="firma" type="text" />
<br />
Contact<br />
<input name="realname" type="text" />
<br />
Straat + nr.<br />
<input name="straat" type="text" />
<br />
Postcode + Gemeente<br />
<input name="gemeente" type="text" />
<br />
E-mail<br />
<input name="email" type="text" />
<br />
Telefoon<br />
<input name="telefoon" type="text" />
<br />
Fax<br />
<input name="fax" type="text" />
<br />
Oplage °<br />
<input name="oplage" type="text" />
<br />
Object °<br />
<input name="object" type="text" />
<br />
Omvang °<br />
<input name="omvang" type="text" />
<br />
Formaat (B x H mm) °<br />
<input name="formaat" type="text" />
<br />
Papier* °<br />
<input name="papier" type="text" />
<br />
Bedrukking R/V** °<br />
<input name="bedrukking" type="text"/>
<br />
<input name="bevestigen" id="bevestigen" value="Bevestigen" type="submit" />
<input name="wissen" id="wissen" value="Wissen" type="reset" />
</form>
The second form is the same but al the fields are disabled.
Second form (I've made it shorter) (offerte2.php):
Code:
<form method="post" action="formmail.php" name="frm_offerte_verzenden" target="_parent" enctype="text/plain">
Firma<br />
<input name="firma" type="text" disabled="disabled" value="<?php print $_POST['firma']; ?>" />
<br />
Contact<br />
<input name="realname" type="text" disabled="disabled" value="<?php print $_POST['realname']; ?>" />
<br />
...
<br />
<input name="versturen" id="versturen" value="Versturen" type="submit" class="css_submit"/>
<input type="hidden" name="recipients" value="info@lasalcommunicatie.be" />
<input type="hidden" name="required" value="email:Uw e-mail,realname:Uw naam" />
<input type="hidden" name="subject" value="Offerte aaanvraag" />
<input type="hidden" name="mail_options" value="NoEmpty" />
<input type="hidden" name="good_url" value="http://www.lasalcommunicatie.be/login/bredero/nl/offerte3.php" />
<input onClick="javascript: history.go(-1)" name="wijzig" id="wijzig" value="Wijzig" type="button" />
</form>
This is the php code I used for the accesscheck in offerte.php and offerte2.php
Code:
<?php
if (!isset($_SESSION)) {
session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
// For security, start by assuming the visitor is NOT authorized.
$isValid = False;
// When a visitor has logged into this site, the Session variable MM_Username set equal to their username.
// Therefore, we know that a user is NOT logged in if that Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers);
$arrGroups = Explode(",", $strGroups);
if (in_array($UserName, $arrUsers)) {
$isValid = true;
}
// Or, you may restrict access to only certain users based on their username.
if (in_array($UserGroup, $arrGroups)) {
$isValid = true;
}
if (($strUsers == "") && true) {
$isValid = true;
}
}
return $isValid;
}
$MM_restrictGoTo = "index.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {
$MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0)
$MM_referrer .= "?" . $QUERY_STRING;
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
header("Location: ". $MM_restrictGoTo);
exit;
}
?>
I've searched the forum but did not find the solution.
All help is welcome.
Cheers,
Berthjen
Bookmarks