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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:18:20+00:00 2026-05-28T02:18:20+00:00

Say I have an HTML form like this to collect an email from a

  • 0

Say I have an HTML form like this to collect an email from a website visitor:

<form name="input" action="handle_email.php" method="post">
Email: <input type="text" name="email" />
<input type="submit" value="Newsletter" />
</form> 

Now when the submit button is pressed I can get the value of the email field in handle_email.php by using $_POST[“email”]. But say I’d like to use the value of the email text input elsewhere. Is it possible to get the email value “outside” of the form processing?

UPDATE: Thanks to everyone for their quick replies. What I’m trying to do is get the email box to do double-duty. For example, I’ve renamed the submit button to “Newsletter” in the above code. When that button is pressed the handle_email.php script will just sign up the user for a newsletter. However, I also have a “Register” link on the same page that redirects the visitor to a registration form where they can enter lots of other info if they like. Now, if the user happened to have entered data in the email text box I’d like to send it along to the registration page so that field can be pre-populated. For example:

<a href="http://mywebsite.com/register?user_email="[how can I put the email here?]"/>Register</a>

My apologies for not being clear enough in my original post.

  • 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-28T02:18:20+00:00Added an answer on May 28, 2026 at 2:18 am

    See my jsFiddle here: http://jsfiddle.net/fuDBL/

    Whenever you change the email field, the link is updated automatically. This requires a small amount of jQuery. So now your form will work as needed, but your link will be updated dynamically so that when someone clicks on it, it contains what they entered in the email field. You should validate the input on the receiving page.

    $('input[name="email"]').change(function(){
      $('#regLink').attr('href')+$('input[name="email"]').val();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have an HTML like this: <html> <form> <input type=button id=Signature8 pdfFieldName=Signature8
Okay so say I have a form element like this: HTML: <div class=form-item> <label>Current
Say that I have two html nodes like this: <div class='node a'>one</div> <input class='node
Say I have a simple form like this: <html> <head> <meta http-equiv=Content-Type content=text/html; charset=utf-8
let's say I have a html structure like this -> (note: in my code
I have have a simple HTML form with say four input widgets (see below)...two
I've got this HTML form where I have multiple input elements: text, radio, and
I have an HTML form with two input textfields. When the user tabs from
I have a jsp page(let's say page1.jsp) which have an html form with action=page2.jsp.
let's say I have HTML stored in HTMLElement object. It's outerHTML property looks like

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.