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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:09:54+00:00 2026-05-22T23:09:54+00:00

If the sub1 has been submitted to show the submit button of sub2 and

  • 0

If the sub1 has been submitted to show the submit button of sub2 and show its value, it will give a notice of:

Notice: Undefined index: sub1

though the submit button is already there and it does not give the value of sub1

What is the reason?

<html>
<head>
<title>test</title>
</head>
<form method="post">
<input type='submit' name='sub1' value='sub1'>
<?php
if(array_key_exists('sub1',$_POST))
{
echo"<input type='submit' name='sub2' value='sub2'>";
}
if(array_key_exists('sub2',$_POST))
{
echo $_POST['sub1'];
}
?>
</form>
</html>
  • 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-22T23:09:55+00:00Added an answer on May 22, 2026 at 11:09 pm

    As newz leads to, change the field that you are expecting to have the myid value to type ‘hidden’. Then it should pass the value correctly. You will have to add a submit button, and set the name to something else besides ‘myid’.

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

Sidebar

Related Questions

I want to union the result of two sub-queries (say SUB1 and SUB2). The
I have the following: <ul id=list> <li>item1 <ul> <li>sub1</li> <li>sub2</li> </ul> </li> </ul> I'd
If you multiple subdomains e.g.: sub1.domain_name.com sub2.domain_name.com Is there a way to have a
I want to let the same user session span across: site.com sub1.site.com sub2.site.com I
I'm trying to set a default text value for the already derived column Sub1
I have an XML fragment like <main> <sub1> <element> <sub2> <element> <sub3/> </element> </sub2>
Perl's documentation says: Since Perl 5.8, thread programming has been available using a model
Ajax-returned HTML includes a table and a submit button (type=button) The table includes jQuery
I have subdomains: sub1.tld.com , sub2.tld.com and so on. This subdomains contain important info.
I have www.abc.com Sub1.abc.com Sub2.abc.com Sub3.abc.com And so on... How can I have a

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.