Warning: Constant ABSPATH already defined in /home/raypasto/www/www/wordpress/wp-config.php on line 26

Warning: Cannot modify header information - headers already sent by (output started at /home/raypasto/www/www/wordpress/wp-config.php:26) in /home/raypasto/www/www/wordpress/wp-includes/rest-api/class-wp-rest-server.php on line 1648

Warning: Cannot modify header information - headers already sent by (output started at /home/raypasto/www/www/wordpress/wp-config.php:26) in /home/raypasto/www/www/wordpress/wp-includes/rest-api/class-wp-rest-server.php on line 1648

Warning: Cannot modify header information - headers already sent by (output started at /home/raypasto/www/www/wordpress/wp-config.php:26) in /home/raypasto/www/www/wordpress/wp-includes/rest-api/class-wp-rest-server.php on line 1648

Warning: Cannot modify header information - headers already sent by (output started at /home/raypasto/www/www/wordpress/wp-config.php:26) in /home/raypasto/www/www/wordpress/wp-includes/rest-api/class-wp-rest-server.php on line 1648

Warning: Cannot modify header information - headers already sent by (output started at /home/raypasto/www/www/wordpress/wp-config.php:26) in /home/raypasto/www/www/wordpress/wp-includes/rest-api/class-wp-rest-server.php on line 1648

Warning: Cannot modify header information - headers already sent by (output started at /home/raypasto/www/www/wordpress/wp-config.php:26) in /home/raypasto/www/www/wordpress/wp-includes/rest-api/class-wp-rest-server.php on line 1648

Warning: Cannot modify header information - headers already sent by (output started at /home/raypasto/www/www/wordpress/wp-config.php:26) in /home/raypasto/www/www/wordpress/wp-includes/rest-api/class-wp-rest-server.php on line 1648

Warning: Cannot modify header information - headers already sent by (output started at /home/raypasto/www/www/wordpress/wp-config.php:26) in /home/raypasto/www/www/wordpress/wp-includes/rest-api/class-wp-rest-server.php on line 1648
{"id":554,"date":"2011-11-17T08:04:47","date_gmt":"2011-11-17T13:04:47","guid":{"rendered":"http:\/\/raypastore.com\/wordpress\/?p=554"},"modified":"2011-11-17T08:04:47","modified_gmt":"2011-11-17T13:04:47","slug":"php-contact-mail-form","status":"publish","type":"post","link":"https:\/\/raypastore.com\/wordpress\/2011\/11\/php-contact-mail-form\/","title":{"rendered":"PHP Contact Mail Form"},"content":{"rendered":"

I know I have another of these posted on my blog however that one assumes that php global settings is OFF and many servers have it set to ON. So here is one that should work regardless of your server settings. To see an example of this working, just click on the contact page of my website in the links above.<\/p>\n

Code:<\/p>\n

<html><\/p>\n

<body><\/p>\n

<?php<\/p>\n

\/\/if submit button pressed<\/p>\n

if(isset($_POST[‘submit’])){<\/p>\n

\/\/sending to my email
\n$name = $_POST[‘name’];
\n$email = $_POST[’email’];
\n$comments = $_POST[‘comments’];
\n$subject = $_POST[‘subject’];
\n$sql = “‘$name’, ‘$email’, ‘$comments'”;
\n$em = “‘$subject'”;
\nmail(‘enterYourEmailAddressHere’, $em, $sql);<\/p>\n

echo(“<p>You message has been sent!” . “<\/p>”);
\n}
\n?><\/p>\n

<form name=”form1″ id=”form1″ method=”post” action=”<?=$PHP_SELF?>”>
\n<p align=”left”><strong>Name:<\/strong>
\n<input type=”text” name=”name” \/>
\n<\/p>
\n<p align=”left”>&nbsp;<\/p>
\n<p align=”left”><strong>Email:<\/strong>
\n<input type=”text” name=”email” \/>
\n<\/p>
\n<p align=”left”>&nbsp;<\/p>
\n<p align=”left”><strong>Subject:<\/strong>
\n<input type=”text” name=”subject” \/>
\n<\/p>
\n<p align=”left”>&nbsp;<\/p>
\n<p align=”left”><strong>Message:<\/strong>
\n<textarea name=”comments” cols=”60″ rows=”3″><\/textarea>
\n<\/p>
\n<p align=”left”>
\n<input name=”submit” type=”submit” id=”submit” value=”submit” \/>
\n<input type=”reset” name=”Submit2″ value=”Reset” \/>
\n<\/p>
\n<\/form><\/p>\n

<\/body><\/p>\n

<\/html><\/p>\n","protected":false},"excerpt":{"rendered":"

I know I have another of these posted on my blog however that one assumes that php global settings is OFF and many servers have it set to ON. So here is one that should work regardless of your server settings. To see an example of this working, just click on the contact page of […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[90,88],"tags":[105,64],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/raypastore.com\/wordpress\/wp-json\/wp\/v2\/posts\/554"}],"collection":[{"href":"https:\/\/raypastore.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/raypastore.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/raypastore.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/raypastore.com\/wordpress\/wp-json\/wp\/v2\/comments?post=554"}],"version-history":[{"count":1,"href":"https:\/\/raypastore.com\/wordpress\/wp-json\/wp\/v2\/posts\/554\/revisions"}],"predecessor-version":[{"id":555,"href":"https:\/\/raypastore.com\/wordpress\/wp-json\/wp\/v2\/posts\/554\/revisions\/555"}],"wp:attachment":[{"href":"https:\/\/raypastore.com\/wordpress\/wp-json\/wp\/v2\/media?parent=554"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/raypastore.com\/wordpress\/wp-json\/wp\/v2\/categories?post=554"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/raypastore.com\/wordpress\/wp-json\/wp\/v2\/tags?post=554"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}