logo-dw

Go Back   Dreamweaver Club Forums > Dreamweaver forums > Web Hosting and FTP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 02-02-2011, 01:14 PM   #1
fluffykat
 
Join Date: Feb 2011
Posts: 3
Unhappy PHP Form's working fine but...

Everything's working great on my forms. When I try to send it with any info omitted it will give me an error and not send it. However, the most frustrating thing. . . I get blank emails every morning at the same time. Completely blank, but from the forms. Any advice is greatly appreciated.
fluffykat is offline   Reply With Quote
Old 02-03-2011, 12:15 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

postthe code for your mail handling script
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is online now   Reply With Quote
Old 02-03-2011, 06:10 AM   #3
fluffykat
 
Join Date: Feb 2011
Posts: 3
Red face Here's the code - ty!

Code:
<?php
$subject="Prayer Request Form";
$emailadd="xxx@xxx.xxx";
$url="http://wwww.xxxxx.xxx/confpr.html";
$req="1";
$text = "Results from Prayer Request form:\n\n"; 
$space = ' ';
$line = '
';
foreach ($_POST as $key => $value)
{
if ($req == '1')
{
if ($value == '')
{echo "$key is empty";die;}
}
$j = strlen($key);
if ($j >= 20)
{echo "Name of form element $key cannot be longer than 20 characters";die;}
$j = 20 - $j;
for ($i = 1; $i <= $j; $i++)
{$space .= ' ';}
$value = str_replace('\n', "$line", $value);
$conc = "{$key}:$space{$value}$line";
$text .= $conc;
$space = ' ';
}
mail($emailadd, $subject, $text, 'From: '.$emailadd.'');
echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
?>

Last edited by Corrosive; 02-03-2011 at 08:17 AM.. Reason: wrapped code
fluffykat is offline   Reply With Quote
Old 02-03-2011, 07:20 AM   #4
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

no problem with formhandler
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is online now   Reply With Quote
Old 02-03-2011, 07:22 AM   #5
fluffykat
 
Join Date: Feb 2011
Posts: 3
Default More help please

Do you have any idea what is causing the blank emails each morning? Or how can I stop them?

Thanks!
fluffykat is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:08 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com