I am just starting with PHP. I learned some basic tutorials and i downloaded some simple script like contact form, guestbook to get practice,,,
yesterday i studied a contact form and i got a doubt in a code,,,,,
1.
$headers = "From: " . $mailform_from . "\n"; // From address
$headers .= "Reply-To: " . $mailform_from . "\n"; // Reply-to address
$headers .= "Organization: " . $company . "\n"; // Organisation
$headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Type
mailform_from is the name given for the "from email" in the HTML form,,,
in this code why it is used two times and also what is the meaning for "$headers .= "
2.
mail(str_replace("RCPT TO:", "", $reciever), str_replace("RCPT TO:", "", $subject), str_replace("RCPT TO:", "", $alertmsg), str_replace("RCPT TO:", "", $headers));
i understand the above code, but i don't know weather i understand correct or not,, here it is,,,
str_replace function checks for the word "RCPT TO:" in the $receiver, if it is not found then it will not replace anything,,,,,
correct,,,,,
and also i don't know why they are using str_replace inside the mail function and why they are using specific word "RCPT TO:",,,,,,,
please help me,,,,