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/feed-rss2.php on line 8
contact page – Dr. Ray Pastore's Instructional Technology Blog https://raypastore.com/wordpress Wed, 02 Nov 2011 12:47:44 +0000 en-US hourly 1 https://wordpress.org/?v=5.7.15 166124113 php: Contact Page https://raypastore.com/wordpress/2010/04/php-contact-page/ https://raypastore.com/wordpress/2010/04/php-contact-page/#respond Wed, 21 Apr 2010 19:45:20 +0000 https://raypastore.com/wordpress/?p=212 for those of you interested in creating a contact page with a form (fields and submit button) that goes directly to your email, check this out. You simply need to copy and paste this code into the body of your html. You also need to put your email address in the part that says ‘YourEmailAddressHere’ and need to save the page as something like: contact.php, not something like contact.html. And thats it. Very easy to do.

<form name=”form1″ id=”form1″ method=”post” action=”<?=$PHP_SELF?>”>
<p>Name:
<input type=”text” name=”name” />
</p>
<p>&nbsp;</p>
<p>Email:
<input type=”text” name=”email” />
</p>
<p>&nbsp;</p>
<p>Subject:
<input type=”text” name=”subject” />
</p>
<p>&nbsp;</p>
<p>Message:
<textarea name=”comments” cols=”40″></textarea>
</p>
<p>&nbsp;</p>
<p>
<input name=”submitentry” type=”submit” value=”SUBMIT” />
<input type=”reset” name=”Submit2″ value=”Reset” />
</p>
</form>
<p>
<?php
if ($submitentry == “SUBMIT”){
$sql = “‘$name’, ‘$email’, ‘$comments'”;
$em = “‘$subject'”;
mail(‘YourEmailAddressHere’, $em, $sql);
echo(“<p>Your message has been sent!” . “</p>”);
}
?></p>

]]>
https://raypastore.com/wordpress/2010/04/php-contact-page/feed/ 0 212