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 4272644
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:36:20+00:00 2026-05-21T07:36:20+00:00

hi in the code below i want to send the email (with input data

  • 0

hi
in the code below i want to send the email (with input data by user, in case email address) to a php file but

$email = $_POST['email']; <<<<<<<<<<<< this retrieve nothing in the php file

js file

<script type="text/javascript">
    $(document).ready(function() {
        $("#Form").submit(function() {
             $.ajax({
                 url: "data.php",
                 type: "post",
                 dataType: "json",
                 data: { email: $('#email').val()},
                 success: function(data) {
                     if () {
                         //something
                     } else {
                         //something
                     }
                 }
             });
             return false;
         });
    });
</script>

any reason for that?

i tested email="onePrivateEmail" in php and the validation is correct, so the problem is the email is not sent by js file. Correct?

thanks

form:

<form method="post" id="Form" action="">
                        <div>
                            <label for="name">Name</label> 
                            <input id="name" name="name" type="text" /> 
                            <span id="nameInfo">Insira o seu nome</span>
                        </div>
                        <div>
                            <label for="email">E-mail</label> 
                            <input id="email" name="email" type="text" /> 
                            <span id="emailInfo">Insira um email válido por favor!</span>
                        </div>
                        <div>
                            <label for="myPassword">Password</label> 
                            <input id="myPassword" name="myPassword" type="password" /> 
                            <span id="myPasswordInfo">Insira pelo menos 4 letras e sem espaços</span>
                            <div id="bar" style="width: 234px; height: 20px;"></div>
                        </div>
                        <div>
                            <label for="pass2">Confirm Password</label> 
                            <input id="pass2" name="pass2" type="password" /> 
                            <span id="pass2Info">Confirme a password</span>
                        </div>
                        <div></div>
                        <div>
                            <input id="send" name="send" type="submit" value="Send" />
                        </div>

as i said (before deleted)

<script type="text/javascript">
$(document).ready(function() {

   alert( $('#email').val() ); 

});
</script>

this doesn’t show anything in the alert

  • 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-21T07:36:21+00:00Added an answer on May 21, 2026 at 7:36 am

    your not targeting the right form you want

     $("#customForm").submit(function() { ....
    

    given the new information I suspect that either you don’t have jquery loaded or you did put anything in the inputs

    here is a demo showing data in eamil

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to open an xlsx file, I have tried the below code,but neither
I want to send email using the php code, Following is the code should
I want to know if the below code: <?php printf (%s, $some_variable); ?> is
i want to put the id into the colorbox below this code nom works
I have the code below. I want to send the value of value1 n.value1s
i want to send a .doc file as an attachment via email. i am
I want to send mail from my android application to given address. But new
I want to send mail from my android application to given address. But now
i am able to send mail using below my code ,but by default after
What's a more elegant way of having the code below where i want to

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.