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

  • SEARCH
  • Home
  • 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 7026051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:03:57+00:00 2026-05-28T00:03:57+00:00

I am using JQuery and AJAX to post to a PHP file which will

  • 0

I am using JQuery and AJAX to post to a PHP file which will eventually parse the data and insert it in a database.

I’m having issue display trying to see what’s wrong with my javascript that it will not post the PHP file.

I know it is not posting because I don’t recieve and email which is the first function in the PHP file.

JS

$(document).ready(function() {
    var ptitle = $("#name").val();
    var pdesc = $("#desc").val();
    var pemail = $("#email.").val();
    $('#submit').click(function() {
        sendValue(ptitle, pdesc, pemail);
    });
});

function sendValue(ptitle, pdesc, pemail) {
    $.post("<?=MOLLY.'update.php'?>", {
        stitle: ptitle,
        sdesc: pdesc,
        semail: pemail
    }, function(data) {
        //
    }, "json");
}

PHP

mail($myemail,'test','test');

if ($_POST){
$title = $_POST['stitle'];
$email = $_POST['semail'];  
mail($myemail,$email,$title);

}
  • 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-05-28T00:03:58+00:00Added an answer on May 28, 2026 at 12:03 am

    You have a typo:

    $(document).ready(function() {
        var ptitle = $("#name").val();
        var pdesc = $("#desc").val();
        var pemail = $("#email.").val();  // <---- I assume you meant "#email".
        $('#submit').click(function() {
            sendValue(ptitle, pdesc, pemail);
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using jQuery, JavaScript and PHP. My Ajax.php file just displays the data.
I'm trying to post some very simple data to a php file using jquery
I'm posting data using jquery/ajax and PHP at the backend. Problem being, when I
I tried to just send some information to a php file using Jquery Ajax.
I am having some issues returning data from on page, using jQuery, PHP and
I am using jQuery and ajax function to access a php file that echo
I am having a couple of problems involving PHP & AJAX using jQuery. To
When I try to get the response from a php file using Jquery ajax,
Using jQuery to make an AJAX call to a PHP file results in the
How to pass multiple checkboxes using jQuery ajax post this is the ajax function

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.