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

Linux, Apache, MySQL, PHP

 
GeneralRe: how to make a link like this site(Code project's thread Subjcect)? Pin
CoderForEver22-Oct-09 23:58
CoderForEver22-Oct-09 23:58 
GeneralRe: how to make a link like this site(Code project's thread Subjcect)? Pin
Marc Firth23-Oct-09 0:00
Marc Firth23-Oct-09 0:00 
GeneralRe: how to make a link like this site(Code project's thread Subjcect)? Pin
Marc Firth23-Oct-09 0:01
Marc Firth23-Oct-09 0:01 
GeneralRe: how to make a link like this site(Code project's thread Subjcect)? Pin
CoderForEver23-Oct-09 0:15
CoderForEver23-Oct-09 0:15 
GeneralRe: how to make a link like this site(Code project's thread Subjcect)? Pin
Marc Firth23-Oct-09 0:22
Marc Firth23-Oct-09 0:22 
GeneralRe: how to make a link like this site(Code project's thread Subjcect)? Pin
CoderForEver23-Oct-09 0:27
CoderForEver23-Oct-09 0:27 
QuestionHow to send email? and How to display text Lyrics when-a link is clicked Pin
CoderForEver17-Oct-09 1:47
CoderForEver17-Oct-09 1:47 
AnswerRe: How to send email? and How to display text Lyrics when-a link is clicked Pin
CalvinHartwell19-Oct-09 11:04
CalvinHartwell19-Oct-09 11:04 
Hey,

Sending an Email in PHP is rather simple. If you want a user to send an email, design and create a form with the appropriate fields (reply email address, email address subject, email address message/content). Then, when the form is submitted (I use post) you can apply validation and process the email (Regular expressions are useful for the email address, make sure you filter empty fields as well).

An email can then be sent like this:

$To = "webmaster@example-site.com";                   // Website Owners Email Address
$Headers = 'From:' . "<" . $frmEmail . ">" . "\r\n";  // Reply Address, Obtained from user input (via a form)
$Subject = 'Subject: '.$frmSubject;                   // The subject of the message, obtained from user input
$Message = 'Message: '.$frmMessage;                   // The Message of the email, obtained from user input 
if(mail($To, $Subject, $Message, $Headers))           // Attempt to send the email to the Website Owner
{ 
  echo "Message Sent!";         
}
else                                                  // Message could not be sent 
{ 
  echo "Error sending message!"; 
}


I suggest you use reCaptcha to guard your form (this system can be exploited easily). Also, you might want to pad the input using "\n" ...

I am not quite sure what you are requesting in regards to the music production system but a database driven website seems to be in order.

Regards,

- Calvin

http://www.calvinhartwell.com
GeneralRe: How to send email? and How to display text Lyrics when-a link is clicked Pin
CoderForEver23-Oct-09 0:03
CoderForEver23-Oct-09 0:03 
Questiongetting data from files Pin
stevieke16-Oct-09 3:09
stevieke16-Oct-09 3:09 
AnswerRe: getting data from files Pin
cjoki16-Oct-09 7:54
cjoki16-Oct-09 7:54 
Questiondatetime.now Pin
Artakazezs12-Oct-09 2:46
Artakazezs12-Oct-09 2:46 
AnswerRe: datetime.now Pin
Luc Pattyn12-Oct-09 2:58
sitebuilderLuc Pattyn12-Oct-09 2:58 
AnswerRe: datetime.now Pin
EliottA12-Oct-09 3:54
EliottA12-Oct-09 3:54 
QuestionLittle help with my php code pls Pin
wartotojas11-Oct-09 2:34
wartotojas11-Oct-09 2:34 
AnswerRe: Little help with my php code pls Pin
fly90411-Oct-09 6:26
fly90411-Oct-09 6:26 
GeneralRe: Little help with my php code pls Pin
wartotojas11-Oct-09 9:54
wartotojas11-Oct-09 9:54 
GeneralRe: Little help with my php code pls Pin
fly90411-Oct-09 10:24
fly90411-Oct-09 10:24 
GeneralRe: Little help with my php code pls Pin
cjoki12-Oct-09 6:12
cjoki12-Oct-09 6:12 
GeneralRe: Little help with my php code pls Pin
fly90412-Oct-09 6:54
fly90412-Oct-09 6:54 
GeneralRe: Little help with my php code pls [modified] Pin
cjoki12-Oct-09 7:54
cjoki12-Oct-09 7:54 
GeneralRe: Little help with my php code pls Pin
fly90412-Oct-09 9:01
fly90412-Oct-09 9:01 
GeneralRe: Little help with my php code pls Pin
cjoki12-Oct-09 9:34
cjoki12-Oct-09 9:34 
GeneralRe: Little help with my php code pls Pin
fly90412-Oct-09 10:22
fly90412-Oct-09 10:22 
GeneralRe: Little help with my php code pls [modified] Pin
cjoki12-Oct-09 11:03
cjoki12-Oct-09 11:03 

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.