Re: printing the parameters out of an URL
| From: | Ryan Adams | Date: | Wed, 31 May 2000 19:23:28 +0000 |
| Subject: | Re: printing the parameters out of an URL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-751@lists.php.net to get a copy of this message | ||
how about something like
http://www.something.com/test.php?a[COMPANY]=ricom&a[FIRST_NAME]=sergej
test.php
------------------------------
while (list ($k, $v) = each ($a)) {
echo "$k : $v<BR>";
}
------------------------------
-RA
On Wed, May 31, 2000 at 08:14:31PM +0200, Andrej Trobentar wrote:
> After i submit a from (using the post method) i get an URL like this:
>
> http://nora.sk-branik.si/andrej/delete.html?name=COMPANY&value=rikom&name=FIRST_NAME&value=sergej&name=LAST_NAME&value=godina&name=ADDRESS&value=mladinska+32b&name=PHONE&value=%2B386+2+220+88+54&name=CELLULAR_PHONE&value=%2B386+609+655+691
>
> I wannt to display this parameters like this:
>
> COMPANY : rikom
> FIRST_NAME : sergej
> ....
>
> How do i do that?
>
> I cant do : <?php echo $name . " : ". $value ?> because then i get only
> the last name and value printed. I don't know if i can use arrays for
> that, my code looks like this (just a section of it) :
>
> // Prints the first record from the database
> for ( $i = 1; $i <= $ncols; $i++ ) {
> $column_name = OCIColumnName($stmt,$i);
> $column_value = OCIResult($stmt,$i);
> print $column_name . ' : ' . $column_value . "<BR>";
>
> print '<FORM method=get action="delete.html">';
> print '<INPUT type="hidden" name="name" value="'.
> $column_name
> .'">';
> print '<INPUT type="hidden" name="value" value="'.
> $column_value
> .'">';
> }
>
> print '<INPUT type="submit" value="delete this
> record">';
> print '</FORM>';
>
>
> I would like to pass the parameters like this :
> print '<INPUT type="hidden" name="name[i]" value="'.
> $column_name .'">';
>
> ...so the name would be an array. Is this possible? If yes, how?
>
> Sorry for the long explenation i would be happy i someone could help
> me.Thanks!
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
---end quoted text---