After successfully generating a form, these errors occur when submitting :
Warning: Supplied argument is not a valid File-Handle resource in /u/web/ccslvc/formgen/forms/process.php on line 15
Warning: Cannot add header information - headers already sent by (output started at /u/web/ccslvc/formgen/forms/process.php:15) in /u/web/ccslvc/formgen/forms/process.php on line 16
Here's the code for "process.php" in the forms folder:
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
if($errors == 1) {
echo $error;
} else {
$where_form_is="http" . ($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"") . "://" . $SERVER_NAME . strrev(strstr(strrev($PHP_SELF),"/"));
$message="
field1: ".$HTTP_POST_VARS["field1"]."
field2: ".$HTTP_POST_VARS["field2"]."
";
mail("jerry@ccslv.com","Form Submitted at your website",$message,"From: phpFormGenerator");
$to_put .= $HTTP_POST_VARS["field1"]."|".$HTTP_POST_VARS["field2"]."
";
fwrite($make,$to_put);
header("Refresh: 0;url=http://www.ccslv.com");
}
This is the very latest version. Any suggestions?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
After successfully generating a form, these errors occur when submitting :
Warning: Supplied argument is not a valid File-Handle resource in /u/web/ccslvc/formgen/forms/process.php on line 15
Warning: Cannot add header information - headers already sent by (output started at /u/web/ccslvc/formgen/forms/process.php:15) in /u/web/ccslvc/formgen/forms/process.php on line 16
Here's the code for "process.php" in the forms folder:
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
if($errors == 1) {
echo $error;
} else {
$where_form_is="http" . ($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"") . "://" . $SERVER_NAME . strrev(strstr(strrev($PHP_SELF),"/"));
$message="
field1: ".$HTTP_POST_VARS["field1"]."
field2: ".$HTTP_POST_VARS["field2"]."
";
mail("jerry@ccslv.com","Form Submitted at your website",$message,"From: phpFormGenerator");
$to_put .= $HTTP_POST_VARS["field1"]."|".$HTTP_POST_VARS["field2"]."
";
fwrite($make,$to_put);
header("Refresh: 0;url=http://www.ccslv.com");
}
This is the very latest version. Any suggestions?
yes sorry about that. Please try V2.0 for now. There are some known bugs in 2.01
Thanks for the quick response. Version 2 is up and running.
cheers