Click here to Skip to main content
15,884,947 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
GeneralRe: KickStart Pin
plnakumar16-Dec-09 17:17
plnakumar16-Dec-09 17:17 
AnswerRe: KickStart Pin
markkuk16-Dec-09 2:15
markkuk16-Dec-09 2:15 
GeneralRe: KickStart Pin
plnakumar16-Dec-09 17:19
plnakumar16-Dec-09 17:19 
QuestionSimple trouble. Pin
Nikz215-Dec-09 11:59
Nikz215-Dec-09 11:59 
AnswerRe: Simple trouble. Pin
cjoki16-Dec-09 9:00
cjoki16-Dec-09 9:00 
GeneralRe: Simple trouble. Pin
Nikz216-Dec-09 9:48
Nikz216-Dec-09 9:48 
QuestionJoomFish problem with my component Pin
sharkbc13-Dec-09 16:48
sharkbc13-Dec-09 16:48 
AnswerRe: JoomFish problem with my component Pin
Marc Firth14-Dec-09 2:24
Marc Firth14-Dec-09 2:24 
GeneralRe: JoomFish problem with my component Pin
sharkbc15-Dec-09 0:04
sharkbc15-Dec-09 0:04 
GeneralRe: JoomFish problem with my component Pin
sharkbc25-Jan-10 15:08
sharkbc25-Jan-10 15:08 
QuestionREMOTE ACCESS OF MYSQL? Pin
hifiger200411-Dec-09 7:31
hifiger200411-Dec-09 7:31 
AnswerRe: REMOTE ACCESS OF MYSQL? Pin
EliottA11-Dec-09 7:41
EliottA11-Dec-09 7:41 
QuestionError while sending e-mail Pin
Gagan.2011-Dec-09 5:46
Gagan.2011-Dec-09 5:46 
AnswerRe: Error while sending e-mail Pin
Dr.Walt Fair, PE11-Dec-09 6:55
professionalDr.Walt Fair, PE11-Dec-09 6:55 
GeneralRe: Error while sending e-mail Pin
Gagan.2011-Dec-09 16:21
Gagan.2011-Dec-09 16:21 
GeneralRe: Error while sending e-mail Pin
Dr.Walt Fair, PE11-Dec-09 16:52
professionalDr.Walt Fair, PE11-Dec-09 16:52 
Your email sending part looks fine. I use
mail($to, $subject, $contents, $from_header);
with the $from_header, although that might be optional. But that's not the problem you are seeing -- your code isn't even getting there.

Looking at your PHP code, the first thing executed is
if(isset($_POST['submit'])) 

Since you get the message you showed, obviously that is being evaluated as false, so the else part is executed showing the message.

So my question to you is: Why are you checking to see if the 'submit' POST variable is set? That's where your code is having problems -- before it ever gets to sending the email.

My suggestion is to take the if/else out and run the code to send the email. That should work if email is allowed on your server. If it works, then you can go back and check for whatever you want to check for with the if statement.

See the following links for examples:

http://www.webcheatsheet.com/php/send_email_text_html_attachment.php[^]

http://php.about.com/od/phpapplications/ss/form_mail.htm[^]

CQ de W5ALT

Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software


GeneralRe: Error while sending e-mail Pin
Gagan.2011-Dec-09 21:47
Gagan.2011-Dec-09 21:47 
GeneralRe: Error while sending e-mail Pin
Dr.Walt Fair, PE12-Dec-09 5:23
professionalDr.Walt Fair, PE12-Dec-09 5:23 
AnswerRe: Error while sending e-mail Pin
adslccn19-Dec-09 17:05
adslccn19-Dec-09 17:05 
Questionregarding reading elements to array from dialog Pin
sriharichowdary10-Dec-09 22:23
sriharichowdary10-Dec-09 22:23 
AnswerRe: regarding reading elements to array from dialog Pin
cjoki22-Dec-09 4:29
cjoki22-Dec-09 4:29 
Questiona block problem Pin
mark_zxy10-Dec-09 16:35
mark_zxy10-Dec-09 16:35 
AnswerRe: a block problem Pin
shawndeprey10-Dec-09 17:12
shawndeprey10-Dec-09 17:12 
GeneralRe: a block problem Pin
mark_zxy10-Dec-09 18:36
mark_zxy10-Dec-09 18:36 
GeneralRe: a block problem Pin
shawndeprey11-Dec-09 1:57
shawndeprey11-Dec-09 1:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.