Hi! I have a form on my page, and when its filled i press button submit. But it uses Outlook to send. How can i make it send forms by email without using Outlook, just rigth from the page? Include the whole code.
use mail function mail($to,$subject,$message,$headers); SAMPLE HEADERS $headers = "From: ".$sender_email.; Make sure your server supports SMTP. Don't worry 90% servers support it
I dont know about books but there are tons of great online resources. For examplew3schools.com/php/ is great for the basics. Another is http://www.lynda.com I personally thought the video tutorials at Lynda were extremely helpful when I was first starting with php.
A More Formatted Example from: http://www.php.net/manual/en/function.mail.php <?php $to = 'nobody@example.com'; $subject = 'the subject'; $message = 'hello'; $headers = 'From: webmaster@example.com' . "\r\n" . 'Reply-To: webmaster@example.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); ?> Code (markup):
If you need books to learning PHP visit BookDepository. They have really cheap books and free delivery for some countries.
<?php $to = "somebody@example.com"; $subject = "My subject"; $txt = "Hello world!"; $headers = "From: webmaster@example.com" . "\r\n" . "CC: somebodyelse@example.com"; mail($to,$subject,$txt,$headers); ?> PHP: