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

Posted by Joe on 02/14/06 19:34

I'm trying to find a solution for what is probably a very simple
problem for an experienced PHP programmer.

We are trying to move over a schedule to a web form. I think I am doing
pretty well getting things together, tying it into a MySQL db and such,
but the killer is that there are about 500 text area global variables
that need to come from the entry form to the script for processing.

So, I have about 500 $_POST['Shift_001'] (where 001 becomes 002,
003...478) variables that I need to place into a table after they've
been filed out in the originating form. I've been able to pretty easily
create the original form with iterations of the Shift suffix, but I'm
just floundering trying to put together a way to use an iteration -- or
any sort of 'automation' -- to write this $_POST['Shift_$i'] on the
fly as TD in a new Table.
I can't get that $i to become a number that will then take the variable
from the originating form and write it. I get all kinds of errors.

Granted, as inexperienced as I am with PHP, I may have the solution
right in front of me -- have a couple O'Reilly books and of course
php.net/manual -- but it isn't coming together.

Any suggestions would be greatly appreciated.

Many thanks,
Joe

 

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

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