HighDots Forums  

question about PHP scripting

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss question about PHP scripting in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Really no nick name
 
Posts: n/a

Default question about PHP scripting - 03-30-2009 , 02:14 AM






i just did a PHP script for a web form, it works fine that when i press submit, it displays the page said "thanks for submitting," but the problem is i never receive the email of the data, any idea?

Reply With Quote
  #2  
Old   
Michael Fesser
 
Posts: n/a

Default Re: question about PHP scripting - 03-30-2009 , 03:41 AM






..oO(Really no nick name)

Quote:
i just did a PHP script for a web form, it works fine that when i press
submit, it displays the page said "thanks for submitting," but the
problem is i never receive the email of the data, any idea?
How is anyone supposed to help without seeing the script?

Micha


Reply With Quote
  #3  
Old   
GarryCT
 
Posts: n/a

Default Re: question about PHP scripting - 03-30-2009 , 01:47 PM



Should it be:
$headers = "From: $email\r\n" ?

Reply With Quote
  #4  
Old   
Really no nick name
 
Posts: n/a

Default Re: question about PHP scripting - 03-30-2009 , 06:49 PM



there's nothing sent to my email at all, so i think there's a problem at the part of the php that send out the email, please help me out

Reply With Quote
  #5  
Old   
GarryCT
 
Posts: n/a

Default Re: question about PHP scripting - 03-30-2009 , 10:14 PM



I think to troubleshoot this, I would simplify the script to send a constant
text string with a header containing only the $from to verify that your PHP
mail is working at all.... Something like:

=====================================
<?php
$to = "receiver (AT) example (DOT) com";
$subject = "The subject";
$body= "Hello there!";
$headers = 'From: yourmail (AT) example (DOT) com' . "\r\n";
$headers .= 'CC: anothermail (AT) example (DOT) com';
$success = mail($me, $subject, $body, $headers);
?>

I haven't run this, so please excuse any typos, etc. Excluding that, this
simple script should really work... The bottom like is to simplify and add
complexity after each success to see what you add that breaks it. Looking at
your code, I really don't see anything out of order, although I don't tend to
use heredocs as a rule, which is not to say I have issue with it.


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

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.