Grow your CSS skills. Land your dream job.

Contact form on my website fails to send email…Please help

  • # September 10, 2013 at 3:07 pm

    Dear Friends, I’m expecting visitor to fill, Name, Email, Phone and Message in the contact form. Once visitor click on “Send” button, I’m expecting an email in my mailbox (which I have maintained in the php code). But there is no action happening.

    I’m putting here my HTML code part for form and related PHP file. Please help.

    HTML code:

    Contact Form

    Your Name:
    Your E-mail:
    Your Phone:

    Your Message:
    <!–Clear–>
    <!–Send–>
    Clear
    Send

    PHP Code:

    alert(‘Thank you for the message. We will contact you shortly.’);
    window.location = ‘contact.html';

    alert(‘Message failed. Please, send an email to contact@xyz.com‘);
    window.location = ‘contact.html';

    I have already few days in fixing this, but unfortunately no luck so far. Dear fellas please help.

    Kind Regards

    __
    # September 10, 2013 at 8:28 pm

    PHP Code:

    alert(‘Thank you for the message. We will contact you shortly.’); window.location = ‘contact.html’;

    alert(‘Message failed. Please, send an email to contact@xyz.com‘); window.location = ‘contact.html’;

    This is javascript, not PHP. Javascript will not (cannot) send you an email.

    Also, please use markdown (or the [Block Code] button) to format your code as code. If you have more than a few lines to share, it would be a good idea to use a service like pastebin or make a gist on github.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".