Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8563729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:01:43+00:00 2026-06-11T17:01:43+00:00

I have always used this code to send email from contact form of websites

  • 0

I have always used this code to send email from contact form of websites to a specified email address:

<?php
$contact_name = $_POST['name'];
$contact_email = $_POST['email'];
$contact_subject = $_POST['subject'];
$contact_message = $_POST['message'];

if( $contact_name == true )
{
    $sender = $contact_email;
    $receiver = "siteadminaddress@myaddress.com";
    $client_ip = $_SERVER['REMOTE_ADDR'];
    $email_body = "Nome: $contact_name \nEmail: $sender \n\nOggetto: $contact_subject \n\nMessaggio: \n\n$contact_message \n\nIP: $client_ip \n\n Contact Form Of Website MyWebsite";       
    $extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion();

    if( mail( $receiver, "My Site Name - $contact_subject", $email_body, $extra ) ) 
    {
        echo "success=yes";
    }
    else
    {
        echo "success=no";
    }
}
?>

Now I have to work with a template that use a file jquery.jigowatt.js to handle the contact form messages, and I must configure this in the same way as php, but I don’t know in that way.

The file jquery.jigowatt.js:

jQuery(document).ready(function(){


    $('#contactform').submit(function(){

        var action = $(this).attr('action');

        $('#submit').attr('disabled','disabled').after('<img src="contact-form/assets/ajax-loader.gif" class="loader" />');

        $("#message").slideUp(750,function() {
        $('#message').hide();

        $.post(action, {
            name: $('#name').val(),
            email: $('#email').val(),
            phone: $('#phone').val(),
            comments: $('#comments').val(),
            verify: $('#verify').val()
        },
            function(data){
                document.getElementById('message').innerHTML = data;
                $('#message').slideDown('slow');
                $('#contactform img.loader').fadeOut('fast',function(){$(this).remove()});
                $('#submit').removeAttr('disabled');
                if(data.match('success') != null) $('#contactform').slideUp('slow');

                // 2 functions added by Themes
                if(data.match('success') != null) $("html,body").animate({
                    scrollTop: $("#message").offset().top
                    }, 1000, function(){
                        //scroll complete function
                    });
                if(data.match('success') == null) $("html,body").animate({
                    scrollTop: $("#message").offset().top
                    }, 1000, function(){
                        //scroll complete function
                    });



            }
        );

        });

        return false;

    });

});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T17:01:44+00:00Added an answer on June 11, 2026 at 5:01 pm

    You can keep your php file and send the data to it via Ajax in jquery.jigowatt.js. I didn’t test this but it should give you the idea. You just need to add the path to the php file in the url: part of the AJAX submit.

    jQuery(document).ready(function(){
        $('#contactform').submit(function(){
        var action = $(this).attr('action');
        $('#submit').attr('disabled','disabled').after('<img src="contact-form/assets/ajax-loader.gif" class="loader" />');
        $("#message").slideUp(750,function() {
        $('#message').hide();      
        $.ajax({
            type:"POST",
            url: "yourPhpFileURL.php",   //put the url of your php file here
            data: $('#contactform').serialize(),
            success: function(data){
                document.getElementById('message').innerHTML = data;
                $('#message').slideDown('slow');
                $('#contactform img.loader').fadeOut('fast',function(){$(this).remove()});
                $('#submit').removeAttr('disabled');
                if(data.match('success') != null) $('#contactform').slideUp('slow');
    
                // 2 functions added by TrueThemes
                if(data.match('success') != null) $("html,body").animate({
                    scrollTop: $("#message").offset().top
                    }, 1000, function(){
                        //scroll complete function
                    });
                if(data.match('success') == null) $("html,body").animate({
                    scrollTop: $("#message").offset().top
                    }, 1000, function(){
                        //scroll complete function
                    });                     
            }
            });
    
        });
    
        return false;
    
    });
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have always used this code to donwload the html source from a web
I am using the same php code I have always used to try and
I have java sdk 1.7. I've always used django/python for web development, this will
As a hardcore WinForms programmer from a Win32 background I have always used Spy++
I have used this code to open whatismyipaddress.com $fp = fsockopen(whatismyipaddress.com, 80, $errno, $errstr,
i have this opensource code which is used to echo back response to web-socket
I am having a stupid issue with a form. I have always used the
I have always used the mouseover event, but while reading the jQuery documentation I
I have generally always used some sort of Hungarian Notation for my field names
I always have used Spring Framework classes as-is. However I am thinking of customizing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.