You are here: Re: How to use iteration to rename $_POST variables? « All PHP « IT news, forums, messages
Re: How to use iteration to rename $_POST variables?

Posted by J.O. Aho on 02/15/06 05:09

Joe wrote:
> Thank you Johannes & Aho for your replies. I will try your suggestions.
>
> I was reading a bit more and wonder if I should approach this with
> foreach since, if I understand correctly, $_POST is an array itself, so
> I could iterate through it. Yes or am I confused (again.)

Yes, $_POST is an array.


> If that is try and I can pull key/value without having to insert a
> second variable, how do you go about differentiating between several
> $_POST variables such as $_POST['shift_01'] which comes from the
> Shift_01 td and $_POST['note_01'] which comes from another field?
>
> Do these exist as arrays within arrays? I need an asprin :-)

to see what your $_POST does contain, use the following

print_r($_POST);

when you are clear how the array looks like and how it works, you can remove
that line from your script.


//Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация