CapellaM44
-
Posts
4 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by CapellaM44
-
-
If possible, I would like to add a drop down menu as to the nature of the e-mail. Example is Business, rental, entertainment, ect. Not necessary, but nice. Below is the basic code I copied from this site and "modified" to add a couple extra fields to suit our needs.<html><body><?phpfunction spamcheck($field) {// Sanitize e-mail address$field=filter_var($field, FILTER_SANITIZE_EMAIL);// Validate e-mail addressif(filter_var($field, FILTER_VALIDATE_EMAIL)) {return TRUE;} else {return FALSE;}}?><h2>T.E.V. Edelweiss Feedback Form</h2><?php// display form if user has not clicked submitif (!isset($_POST["submit"])) {?><form method="post" action="<?php echo $_SERVER["PHP_SELF"];?>Your E-mail: <input type="text" name="Your E-Mauk"><br>Your Name <input type="text" name="Your Name"><br>Your Phone Number: <input type="text" name="Your Phone Number"><br>Best way to reach you: <input type="text" name="Best way to reach you:"><br>Subject: <input type="text" name="subject"><br>Message: <textarea rows="10" cols="40" name="message"></textarea><br><input type="submit" name="submit" value="Submit Feedback"></form><?php} else { // the user has submitted the form// Check if the "from" input field is filled outif (isset($_POST["from"])) {// Check if "from" email address is valid$mailcheck = spamcheck($_POST["from"]);if ($mailcheck==FALSE) {echo "Invalid input";} else {$from = $_POST["from"]; // sender$subject = $_POST["subject"];$message = $_POST["message"];// message lines should not exceed 70 characters (PHP rule), so wrap it$message = wordwrap($message, 70);// send mailmail("use_contact_form@tevedelweiss.org",$subject,$message,"From: $fromn");echo "Thank you for sending us feedback";}}}?></body></html>
-
I am extremely new to programming. I got thrown into the position of running our club's web page (long story) I managed to recreate a web page that is a lot more user friendly than the old site thanks to the help from this site. However, there is one thing I can't get right. That is the form page.
Our host is "hostgator.com" and they have a short bit of code on their page I tried to use, but was unsuccessful. I kept receiving an error saying "e-mail address cannot contain (,)<> ect. I have checked and double checked the code and e-mail, but I can't seems o make anything work.
When I use the code provided in the "PHP Secure E-mail" section on this site, I can click submit, but get a 404 error. I don't seem to be able to find a way to redirect the e-mail back to the main site so I do not receive this error. I am creating the form in text, and uploading it to a test folder on the site so I can see how it works over the net.
Is there someone here who may be able to help me get a form up and running?
Thanks
-
E-mail Forums
in PHP
I am very new to PHP and have been thrown into a very uncomfortable position with a non profit organization I work with. They are in need of a web site upgrade in a very bad way. I have managed to create most of the site with help from your pages. However, I am having issues with an e-mail page. Most of our requests come in via e-mail so it's important to get it right.
The bias form on your site is a little too basic for our needs, besides, when I added my own address to the code, I was unable to make it work. Can someone offer a little advice on how I can get this e-mail page up and running quickly?
I also need a little advice on editing the back form that is an example. Adding my address did not work, and I would like to have the person get a "thank you for submitting" page after they fill out the form.
Thanks
Trouble with e-mail form
in PHP
Posted
Thank you for the info on the drop down. I just want this form to e-mail me (which for some reason it isn't doing) Once I get that part working, I can customize it the way I want.