Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Get all the $_post

Posted on 2009-05-04
3
Medium Priority
?
229 Views
Last Modified: 2012-05-06
How can i retrieve all variables posted through $_post
i dont know how many will be passed everytime the post is submitted i only
know they will be named like this:
itemid_456
itemid_7874
itemid_4841
itemid_4843
etc...
0
Comment
Question by:CMDAI
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 24293753
you can loop in the $_POST array... and then check the key name
foreach($_POST as $key => $value)
{
   // check name here, using $key value
 
}

Open in new window

0
 
LVL 4

Expert Comment

by:max-hb
ID: 24293760
Maybe simply iterate through all available post vars?!

<?php
echo "<pre>";
foreach($_POST as $key => $value) {
  echo "Variable $key has value(s):<br/>";
  print_r($value);
}
?>
Regards
 Marc

0
 
LVL 1

Author Closing Comment

by:CMDAI
ID: 31577490
thanks
0

Featured Post

The Ideal Solution for Multi-Display Applications

Check out ATEN’s VS1912 12-Port DP Video Wall Media Player at InfoComm 2017. Kerri describes how easy it is to design creative video walls in asymmetric layouts and schedule detailed playlists ahead of time with its advanced scheduling feature.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
This article discusses how to implement server side field validation and display customized error messages to the client.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question