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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:04:10+00:00 2026-05-28T22:04:10+00:00

main.php files has: $randnum=rand(100,500); echo ‘ <form name=form1 id=form1 action=my.php method=post> <input type=text name=A’.$randnum.’

  • 0

main.php files has:

$randnum=rand(100,500);
echo '
<form name="form1" id="form1" action="my.php" method="post">
<input type="text" name="A'.$randnum.'" id="A'.$randnum.'" value="catch me!">
<input name="Submit" type="submit" value="Send">
</form>
';

browser displays:

<form name="form1" id="form1" action="my.php" method="post">
<input type="text" name="A382" id="A382" value="catch me!">
<input name="Submit" type="submit" value="Send">
</form>

How to catch “catch me!” from the form ($_POST[‘A382’] value)? (382 is not defined before the page was loaded). Any way to get an array of all variables that are send by POST method? Any better way?

Thank you.

  • 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-28T22:04:11+00:00Added an answer on May 28, 2026 at 10:04 pm
    foreach($_POST as $key=>$value)
    {
        if(substr($key,0,1) == 'A')
        {
            $number = intval(substr($key, 1, 3)); //Number from A***
            if($number)
                $data = $value; //Value of field A***
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two php files: main.class.php form.class.php in these files there are two class
I have a main.php file which has the following three included php files: <!--TAB
I have written jQuery code, in files Main.html and ajax.php . The ajax.php file
I'm stumped! In PHP in Netbeans (6.8), a project has two files, file1.php and
I have a sub-folder with two files. The first is email.php, with a form
When a user upload a file(users can upload multiple files) exec('nohup php /main/apache2/work/upload/run.php &');
I'm writing a web app using php. The main file (index.php) has some Hebrew
I have a problem in integrating PHP and JQuery: My main file is MyFile.html
The Idea I have a main PHP page that loads content in DIV's from
How do I make the following url forbidden in apache; main/index.php?site=ing I have tried

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.