Link to home
Start Free TrialLog in
Avatar of CMDAI
CMDAI

asked on

Get all the $_post

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...
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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

Avatar of CMDAI
CMDAI

ASKER

thanks