LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 05-13-2005, 08:13 PM   #1
Alexander.s
Member
 
Registered: Sep 2004
Location: Sweden
Distribution: Slackware, Gentoo!
Posts: 115

Rep: Reputation: 15
How does the mail function work(PHP)


Iv done the same thing as this example.
But i cant seem to get it working, running the script threw the shell
only gives me errors on every line, and running it threw the website doesnt give any results either
Is there any other easy way of creating a function where people can click on a
button to email me instant.



<?php
mail("joecool@example.com", "My Subject", "Line 1\nLine 2\nLine 3");
?>

EDIT:
ps. should i use <form action="mail.php" method="post" or "get"> ???

Last edited by Alexander.s; 05-13-2005 at 08:19 PM.
 
Old 05-15-2005, 09:02 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
What errors do you get?

You can use post or get, as the names suggest though one is for sending data and one is for requesting data.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP !!! php mail function akamaru607 Programming 22 08-26-2005 02:44 PM
PHP Mail() function doesn't work Messiadbunny Linux - Software 4 06-11-2005 04:40 AM
sendmail and PHP mail() function tudekoen Linux - Software 0 05-08-2004 04:45 PM
PHP - mail function saravanan1979 Programming 2 08-06-2003 01:46 AM
Using the PHP mail() Function !?!? Hdata Programming 0 06-22-2003 06:02 AM


All times are GMT -5. The time now is 06:39 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration