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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:43:54+00:00 2026-05-30T13:43:54+00:00

I am trying to obtain and transfer information from a HTML web form (through

  • 0

I am trying to obtain and transfer information from a HTML web form (through input text field), then store that info into another file within a PHP variable. As you can see below, I have created a string to search ($str_to_find) and manually used ‘script’ for the string, but what I want to do is fill this area dynamically with information from a web form in another file.

I know this may be a general question, but I have not clue where to start.

function check_files($this_file) {
$str_to_find='script'; // the string(code/text) to search for
//I want to fill the 'string' above with info from another file's web form, if possible.
  • 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-30T13:43:55+00:00Added an answer on May 30, 2026 at 1:43 pm

    It sounds like you just want to use GET or POST data. Here is basic sample. A person will fill in the form on form.html and click submit. You will then collect the POST data from this form by the attribute names. In this case the process.php script just prints out “Hello <firstname> <lastname>” but alternatively you can display it as you wish.

    form.html

    <form action="process.php" method="post">
      <input name="fname" type="text" />
      <input name="lname" type="text" />
      <input type="submit" />
    </form>
    

    process.php

    $fname = $_POST['fname'];
    $lname = $_POST['lname'];
    echo "Hello $fname $lname"
    ...
    

    If you want this to display information on the same page, you can use AJAX. Refer to http://api.jquery.com/jQuery.ajax/ for examples. I have included one below:

    form.html

    ...
    <head>
    ...
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script type="text/javascript">
        // when document is ready do this
        $(document).ready(function() {
    
            // listen to when users click on the send button
            $('#send-ajax').click(function() {
    
                // get input data
                $fname = $('#fname').val();
                $lname = $('#lname').val();
    
                // result container
                $result = $('#result-ajax');
    
                // create ajax request to process and store
                // result in the div container above the form
                $.ajax({
                    url: 'process.php',
                    type: 'POST',
                    dataType: 'HTML',
                    data: {
                        fname: $fname,
                        lname: $lname
                    },
                    success: function($html) {
                        $result.html($html);
                    },
                    error: function() {
                        $result.html('<b>Request Failed</b>');
                    }
                });
            });
        });
    </script>
    </head>
    <body>
        <div id="result-ajax"></div>
        <input id="fname"​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ />
        <input id="lname" />
        <button id="send-ajax" value="send">Send</button>​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​
    </body>
    ...
    

    process.php

    Same as above

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

Sidebar

Related Questions

I'm trying to obtain the keywords from an HTML page that I'm scraping with
I am trying to obtain some information from a webpage that requires login. I
Lets say i'm trying to obtain a phone number from an input field which
I am trying to obtain class information on a field inside a model, when
I am trying to obtain the ip address from a text file so when
I'm trying to obtain the price from a field called DiscountMarkupPriceRate1 on my second
I am trying to obtain html from the WebBrowser control, but it must include
i am trying to obtain an item from a collection that occurs most frequently.
I'm trying to obtain data using regular expressions from a html file, by implementing
I am trying to obtain the <RowDefinitions> element from my Xaml, through Javascript, so

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.