Jump to content

snottrocket

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

snottrocket's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. so that would go in the parent html file...the one with the iframe...or would it go in file that the form lives in. How would that work with regards the "thank you for sending us an email" message?
  2. Update: Form works great now. Thanks for all the help. Hopefully one last question: the form goes through and the email client displays the subject, body of the email but the from section lists as unknown sender or nobody. We'd like to change that to read the email address of whomever sent the info if(isset($_POST['submit']) || isset( $_POST['submit_x'] )) { $to = "xxxxx@domain.com"; $subject = "subject of email!"; $name = $_POST['name']; $address = $_POST['address']; $city = $_POST['city']; $state = $_POST['state']; $zip = $_POST['zip']; $owner = $_POST['owner']; $parcel = $_POST['parcel']; $phone = $_POST['phone']; $email = $_POST['email']; $thanking = $_POST['thanking']; $comment = $_POST['comment']; $checkOff = $_POST['checkOff']; $body = "From: $name\n Address: $address\n City: $city\n State: $state\n Zip: $zip\n Owner: $owner\n Parcel Number: $parcel\n Phone Number: $phone\n Referral Name: $thanking\n E-Mail: $email\n Option: $checkOff\n Message: $comment\n"; echo "Thank you! Service Inquiry has been submitted to $to!"; mail($to, $subject, $body, $email); } else { echo "Oops. You have reached this page in error."; } using $email doesn't seem to work but I'm waiting to see if the server needs to update fully. Any thoughts on this?
  3. That's really the only way i can categorize this particular question. I have a site loading a form into an iframe. probably not the smartest thing to do but I've built a one-page portfolio site that scrolls to each anchor point with the scrollTo script. None the less, my form loads into my frame. I started thinking about usability and how odd it might be to a non-techie, non-webby visitor to go to the form, submit and then maybe want to send another message. Although not very probable, it's the stuff we don't anticipate happening that usually gets us in deep. Really, what I'm looking for is something where after the visitor submits the form and it says "thank you for sending us an email" that it would either automatically reset my index page OR give the visitor the option of manually resetting the page. my form <form method="POST" action="mailer.php"><br /> Name:<br /> <input type="text" name="name" size="50"><br> <br /> E-Mail:<br> <input type="text" name="email" size="50"><br> <br /> Comments:<br> <textarea wrap="soft" rows="5" name="message" cols="48"></textarea> <br> <br> <input type="submit" value="Submit" name="submit"> </form> php script <?php if(isset($_POST['submit']) || isset( $_POST['submit_x'] )) { $to = "email@mydomain.com"; $subject = "Contact from a visitor"; $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; $body = "From: $name\n E-Mail: $email\n Message:\n $message"; echo "Your email has been sent to $to!"; mail($to, $subject, $body); } else { echo "blarg!!!"; } ?>
  4. Update: It seems to have worked...but IE8 doesn't seem to work. Partner tested on Firefox and Safari. What would be different on IE?
  5. okay so it does work. you got an email response from the form? So it's possible that my hosting service is trashing it before it does anything? It's weird, like I mentioned before; my personal site is flash based and I have a contact form...php driven...and it works pretty good...though there are some issues, I'll address them in another thread. OKay..well, I'll send it over to my partner and see if he can get it working with a different email address just in case there's a problem there. I'll post what I find out. Thanks so much.
  6. The files live on a remote hosting server. I also, sent the files to friend who posted them on his server...same result, like I said. I'm still troubleshooting my local WAMP setup but it's kind of taking a back seat to this.
  7. So, I'm working on this contact form for a project. I found a tutorial on building such a form which turned out to be simple enough. It seems to work as far as when I submit, the echo response shows up in the browser window..however, there's no actual email that shows up in my mailbox. Here's the code for the form: <form name="contact" id="contact" method="post" action="mailer.php"> <p> <label for="fullname">Name:</label> <input type="text" name="name" class="txt"> </p> <p> <label for="address"> Property Street Address:</label> <input type="text" name="address" class="txt"> </p> <p> <label for="city">City:</label> <input type="text" name="city" class="txt"> </p> <p> <label for="state">State:</label> <input type="text" name="state" class="txt"> </p> <p> <label for="zip">Zip:</label> <input type="text" name="zip" class="txt"> </p> <p> <label for="owners">Owner(s) of Record:</label> <input type="text" name="owner" class="txt"> </p> <p> <label for="parcel">Parcel ID# (Leave Blank if Unknown):</label> <input type="text" name="parcel" class="txt"> </p> <p> <label for="phone">Phone:</label> <input type="text" name="phone" class="txt"> </p> <p> <label for="email">Email:</label> <input type="text" name="email" class="txt"> </p> <p> <label for="thanking">Who do we thank for referring you?</label> <input type="text" name="thanking" class="txt"> </p> <p><strong>Ready to reduce your soaring property taxes? Then check off level of assistance.</strong></p> <p> <input type="radio" value="yes" name="option"> Tool Box <input type="radio" value="no" name="option"> Self Starter Kits <input type="radio" value="no" name="option"> Predetermination Analysis <input type="radio" value="no" name="option"> Consultation <input type="radio" value="no" name="option"> Other </p> <p> Message: <textarea rows="9" name="comment" cols="30"></textarea> </p> <div id="subButton"> <input class="buttons" type="image" src="images/formSubmit.gif" tabindex="3" name="submit" value="submit" /> </div> </form> Here's the code for the script: <?php if(isset($_POST['submit'])) { $to = "xxxxxxx@goofyEmail.com"; $subject = "Service inquiry"; $name = $_POST['name']; $address = $_POST['address']; $city = $_POST['city']; $state = $_POST['state']; $zip = $_POST['zip']; $owner = $_POST['owner']; $parcel = $_POST['parcel']; $phone = $_POST['phone']; $email = $_POST['email']; $thanking = $_POST['thanking']; $comment = $_POST['comment']; $option = $_POST['radio']; $body = "From: $name\n Address: $address\n City: $city\n State: $state\n Zip: $zip\n Owner: $owner\n Parcel Number: $parcel\n Phone Number: $phone\n Referral Name: $thanking\n E-Mail: $email\n Option: $option\n Message: $comment\n "; echo "Thank you! Your Wicked Awesome Service Inquiry has been submitted to $to!"; mail($to, $subject, $body, "From: $from"); } else { echo "Oops. You have reached this page in error."; } ?> I also sent this to a friend for him to test on his server. Same results..form works but no email arrives. now, someone gave me this code to try out in order to make sure it's not my server and is in fact my code: <?php $mail_test = mail("youremail@yourdomain.com", "Test Email", "This is a test message..."); if( $mail_test === true ) { echo "Sent email"; } else { echo "Mail failed!"; } ?> tried the page...loaded it in my browser and it worked fine...but no email hit my inbox. So, I'm not sure if it's my code or my hosting. I have a flash - to - php form for my personal site that works fine so that would have me thinking it might be my hosting. I tried moving this form and the script to a different location on the server thinking that might make a difference but it didn't. Also, again, I had a friend load it on their server as well...thinking it might be my server but the result is the same. So, I'm quite sure it's my code...but I'm just not sure where the issue is. One other thing, I looked at another tutorial with the most basic form I could find...email address and message input, button...nothing more. Same result. Not sure where to go from here. Any help or input is appreciated.
  8. Hey folks. IRL my name is Andy. Designer...front end developer..amateur musicologist. I'm quite a nOOb with php but I'm hoping to learn little by little so I don't have to ask for help so much. But I'm always looking for a new place to talk shop or whatever.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.