The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Form submits - writes to database but doesnt process form to email - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5)
+--- Thread: Form submits - writes to database but doesnt process form to email (/showthread.php?tid=188)



Form submits - writes to database but doesnt process form to email - Beverleyh - Jun 22nd, 2009

I have 2 pages - "contact.php" (the form [verified as Form URL]) and "contact_thanks.php" (the process script [verified as Redirect URL])
[Form Field Name] and [Display Name] both match exactly in step 4 - Database Setup.

My problem is that the form appears to submit and jumps to the contact_thanks.php page but the variables arn't passed so it doesnt submit to email.
It does write to the database though.

The form works fine without formtools, and I get the email as expected.

I even checked the boxes for "pass on value to redirect page?" for all my form fields but that doesnt help either.

Can anyone see why my code isnt working and please advise what I might need to change? Or is there anything I need to check in the forumtool configuration?

contact.php -
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>JemCon 2009 :: Contact JemCon</title>

<?php include ('inc/template_header.html');?>

<h1>CONTACT JEMCON</h1>
Do you have a comment, suggestion or question for the <a href="staff.php">JemCon Staff</a> that hasn't been answered in our <a href="faqs.php">JemCon FAQs</a> page?<br><br>

Contact us via the <a href="messageboard.php">JemCon messageboard</a> (you will need to
<a href="messageboard/profile.php?mode=register">register</a> to do this) or the online form below:<br><br><br>

<center>
<form action="http://www.jemcon.org/process_scripts/formtools/process.php" method="post" id="contactform">
<input type="hidden" name="form_tools_form_id" value="3" />
<table border="0" width="100%" cellpadding="0">
<tr>
<td align="right" width="45%"><b>Full Name:</b></td><td align="left" width="55%"> <INPUT TYPE="text" NAME="fullname" SIZE="30"></td></tr>
<tr><td align="right"><b>Email Address:</b></td><td align="left"> <INPUT TYPE="text" NAME="email" SIZE="30"></td></tr>
<tr><td align="right"><b>Subject:</b></td><td align="left"> <INPUT TYPE="text" NAME="subject" SIZE="30"></td></tr>
<tr><td align="right" valign="top"><b>Message:</b></td><td align="left"><TEXTAREA NAME="message" ROWS=5 COLS=30 style="border:1px solid #990099"></TEXTAREA></td></tr>
<tr><td width="100%" align="center" colspan="2">
<INPUT TYPE="submit" value="Submit" style="cursor:pointer; cursor:hand;">
<INPUT TYPE="reset" style="cursor:pointer; cursor:hand;">
</td></tr></table></form>
</center>

<?php include ('inc/template_footer.html');?>

contact_thanks.php -
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>JemCon 2009 :: Contact JemCon</title>

<?php include ('inc/template_header.html');?>

<h1>CONTACT JEMCON</h1>
<center>
<?php
if(empty($fullname) || empty($subject) || empty($email) || empty($message)) {
echo "<h2>Error - You must complete all fields!</h2><br><a href='#' onClick='history.go(-1)'>Return to previous page</a>\n";
}
else {
$from = "From: Admin @ JemCon <admin@jemcon.org>";
$to = "webmaster@jemcon.org";
$subject = "JemCon Contact Form";
$body = "Name: $fullname \nEmail Address:  $email \nSubject: $subject \n\nMessage:  $message\n";
mail($to,$subject,$body,$from);
echo "<h2>Thank you for contacting us.</h2>\n";
}
?>
</center>
<br><br>

<h1>CONTACT INFORMATION:: Here's what you just sent to us</h1>
<center>
<table border="0" width="100%" cellpadding="0">
<tr>
<td align="right" width="45%"><b>Full Name:</b></td><td align="left" width="55%"><?php echo $_POST['fullname']; ?></td></tr>
<tr><td align="right"><b>Email Address:</b></td><td align="left"><?php echo $_POST['email']; ?></td></tr>
<tr><td align="right"><b>Subject:</b></td><td align="left"><?php echo $_POST['subject']; ?></td></tr>
<tr><td align="right" valign="top"><b>Message:</b></td><td align="left"><?php echo $_POST['message']; ?></td></tr>
<tr><td width="100%" align="center" colspan="2">
</table>
</center>
<br><br>
We will reply to you shortly. In the meantime, if you wish to ask us anything else feel free to contact us again.
<br><br>

<?php include ('inc/template_footer.html');?>



RE: Form submits - writes to database but doesnt process form to email - Beverleyh - Jun 23rd, 2009

Ignore me. I set up swift mailer on SMTP and now it submits to email


RE: Form submits - writes to database but doesnt process form to email - Ben - Jun 23rd, 2009

Good to hear it's working now! :-)


RE: Form submits - writes to database but doesnt process form to email - sujith - Sep 2nd, 2009

(Jun 23rd, 2009, 6:09 PM)Ben Wrote: Good to hear it's working now! :-)

I am facing the same issue. Swift mailer is working fine. But default php sent mail with form tools is not working. The form writes to database.

I check the php sent mail function is working with other scripts.

I am looking for a solution


RE: Form submits - writes to database but doesnt process form to email - Ben - Sep 2nd, 2009

Hi sujith,

This could be for a number of reasons. Form Tools does some pretty complicated stuff with the mail function, like sending multi-part emails. This isn't always compatible with all systems, which is why there's a Swift Mailer module. That's a much better way to send emails.

So if Swift Mailer is working fine for you, can't you use that?

- Ben


RE: Form submits - writes to database but doesnt process form to email - sujith - Sep 2nd, 2009

Thanks Ben for your reply and this excellent form tools.

I am using swift mailer and its working fine. For academic interest, i asked you about the php mail function.


RE: Form submits - writes to database but doesnt process form to email - Ben - Sep 7th, 2009

Ah I see. Thanks!

Ben