Re: GET and POST variables name
| From: | Marek Kilimajer | Date: | Sat, 15 May 2004 15:58:25 +0000 |
| Subject: | Re: GET and POST variables name | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-186316@lists.php.net to get a copy of this message | ||
foreach($_POST as $key => $parole) {
echo "$key = $parole <br>";
}
Dino Costantini wrote:
i know it could be a stupid problem, but i need a help and i hope u could be generous with me :). this is my code, it writes the list of POST and GET variables. <? echo "GET:<BR>"; foreach($_GET as $parole) { echo "Parola = $parole <br>"; } echo "<br><br>POST:<BR>"; foreach($_POST as $parole) { echo "Parola = $parole <br>"; } ?> i want to write also the name of the variable, for example: if i call my page so ---> index.php?id=2&a=4 it writesGET: Parola = 2 Parola = 4 POST:I want it to write:GET: id = 2 a = 4 POST:how can I do it? thx for any help.