Jump to content

Recommended Posts

i wish to get all details used in the $_GET statements

i tried this but not sure why it will not work, is this the correct way of have i not got this right

i get an error saying that i have a double arrow ?

please advise

thank you



$postdetails = "";
foreach ($data = $key => $_GET) {
$postdetails .= '.'.$key.'. '.$data[$key].'.\n';
}
Link to comment
https://forums.phpfreaks.com/topic/12287-getting-all-info-from-_post-using-while/
Share on other sites

is it post or get? your title says POST but you are talking about GET in your question. i guess it doesn't matter. it would be like this:
[code]
$postdetails = "";
// use $_POST instead of $_GET if you want to do POST vars
foreach($_GET as $key => $val) {
   $postdetails .= $key . " " . $val . "\n"; //or however you wish to format it
}
[/code]
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.