The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> PHP Development
|
Webform not working
Discuss Webform not working in the PHP Development forum on Dev Shed. Webform not working PHP Development forum discussing coding practices, tips on PHP, and other PHP-related topics. PHP is an open source scripting language that has taken the web development industry by storm.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

January 2nd, 2013, 09:41 AM
|
|
Registered User
|
|
Join Date: May 2011
Posts: 5
Time spent in forums: 1 h 42 m 31 sec
Reputation Power: 0
|
|
|
Webform not working
webform not returning results:
the site below is not emailing data from webform.
assist2own dott comm
|

January 2nd, 2013, 09:47 AM
|
|
|
Please read ManiacDan's New User Guide to learn how to post a proper question.
__________________
There are 10 kinds of people in the world. Those that understand binary and those that don't.
|

January 2nd, 2013, 04:41 PM
|
 |
Known to taste like chicken
|
|
Join Date: Aug 2003
Location: In front of my computer
|
|
im going to assume this is related to their other post
__________________
"Take thy beak from out my heart, and take thy form from off my door" - Homer J Simpson / Edgar Allan Poe
Looking for a project Idea?
|

January 3rd, 2013, 04:07 AM
|
|
Registered User
|
|
Join Date: May 2011
Posts: 5
Time spent in forums: 1 h 42 m 31 sec
Reputation Power: 0
|
|
|
no this is from a different site and I moved servers
|

January 3rd, 2013, 04:14 AM
|
 |
Known to taste like chicken
|
|
Join Date: Aug 2003
Location: In front of my computer
|
|
Quote: | Originally Posted by vavi2s no this is from a different site and I moved servers |
That's great, but it doesn't help us solve your problem.
please read the new user guide and then we might be able to help you.
We need to know more than "it doesn't work" to help you, like code (properly wrapped in the correct code tags), errors and what not.
|

January 3rd, 2013, 04:55 AM
|
|
Registered User
|
|
Join Date: May 2011
Posts: 5
Time spent in forums: 1 h 42 m 31 sec
Reputation Power: 0
|
|
|
hows that? the email is never delivered
|

January 3rd, 2013, 06:55 AM
|
|
|
|
Again properly wrap your code. You obviously did not read the guide nor the sticky at the top of this form about using [ PHP ] tags. Edit your post, highlight your code then click the php icon and be sure to add indentation so we can read it. Further, when you run this code, what does your SMTP log show?
|

January 3rd, 2013, 07:03 AM
|
|
Registered User
|
|
Join Date: May 2011
Posts: 5
Time spent in forums: 1 h 42 m 31 sec
Reputation Power: 0
|
|
PHP Code:
<?php
$e;
foreach ($_POST as $values){
if(empty($values)){
$e=1;
break;
}
}
$email=$_POST['email'];
if(!ctype_digit($_POST['zip'])){
header("location:page1.php?id=3");
exit;
}
if($e==1){
header("location:page1.php?id=1");
}else{
//send an email
$to = "abcbobby@yahoo.com";
$subject = "form submission at your website";
$message;
foreach ($_POST as $key=>$values){
$message=$message.' '.$key.' :'.$values;
}
$from = "Rent2ownassist.com";
$headers = "From:" . $from;
mail($to,$subject,$message);
header("location:page2.html");}
?>
|

January 3rd, 2013, 07:25 AM
|
|
|
|
PHP Mail is not the easiest thing to use unless you really understand what you are doing. You really should use PHPMailer as it is much easier. In any case, one thing I see as a possibility is the @ in double quotes. PHP is probably recognizing that as an operator. You need to either escape it (\) or enclose it in single quotes. Had you looked at your SMTP log you would have seen that message being rejected with an invalid recipient error. You also should be aware that your message will show up at the other end all mashed together. You need to use '\r\n' for line breaks.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|