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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:43:01+00:00 2026-05-22T21:43:01+00:00

i have this code it can go to if(array_key_exists(‘p’,$_POST)) but can’t go to if(isset($_POST[‘p’][$i])

  • 0

i have this code it can go to if(array_key_exists('p',$_POST)) but can’t go to if(isset($_POST['p'][$i]) && $_POST['p'][$i]==$row[0])

i tried to echo $_POST['p'][0] in if(array_key_exists('p',$_POST)) but it tells me 0 is undefined

i don’t know my error.

if(array_key_exists('update',$_POST)){
//somecode
echo"<td><input type='Checkbox' name='p[$i]'  value='$row[0]' unchecked onclick='openinput()'/></td>";
if(array_key_exists('p',$_POST))
        {
        $result=mysql_query($query);        
        if($result)
        {
            $num=mysql_num_rows($result);
            if($num>0)
            {
                if(isset($_POST['p'][$i]) && $_POST['p'][$i]==$row[0])
                {
                    foreach($_POST['p'] as $key=>$value)
                         {
                         //some code
                    }   
                }
            }
        }
}
}
  • 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-22T21:43:01+00:00Added an answer on May 22, 2026 at 9:43 pm

    I think the following line gives problem

    echo"<td><input type='Checkbox' name='p[$i]'  ...
    

    Try this

    echo"<td><input type='Checkbox' name='p[]'  ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code to update users data, but I can't write the for
I have this code which can display drop down in div tag of html.
I have this code ,now can anyone reply s what happens to the lock
I have this code and can't figure out what seems to be the problem:
I have this code so I can grab the values ind the dataset before
i have this code in c# doc.SelectSingleNode(WhoisRecord/registrant/email).InnerText how can i check whether it is
I have this code below. As you can see I am passing two variables
I have this code in Linq. Anybody can provide the t-sql. thanks! var tsr
Challenge: I have this code that fails to compile. Can you figure out what's
I am trying to learn javascript i have this code: x=x.replace(/^\s+|\s+$/g,); can i have

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.