473,396 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Extract form field names when they're not known in advance

170 100+
I have a page with a form which has automatically generated fields, (which come from mysql column names). There could be any number of these fields, and I have no way of knowing exactly what they're called. But obviously I need to know their names, in order to extract their values on the submission page.

They are either of the form c%status#, e%status# or t%status#

% is a number between 1 and 13 (inclusive)
# could be anything in the pattern 01, 02, 03, with no limit

Eg: fields could be c2status03 and e4status07, but I don't know this in advance. These would be generated on the fly from mysql.

Is there a way for me to somehow get these names so I can extract their values on the submission page? Or have I hit a dead end?
Mar 30 '07 #1
2 1388
Have you tried a foreach on $_POST?
http://uk2.php.net/manual/en/control...es.foreach.php
Mar 30 '07 #2
beary
170 100+
Have you tried a foreach on $_POST?
http://uk2.php.net/manual/en/control...es.foreach.php

No. Hadn't thought of it. But you've saved me! Thanks for the suggestion. It works now...
Mar 31 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Michael Winter | last post by:
In a recent post ("About C error" by Victor, 21 Sep 2003), comments were made about the poster's use of macros. What I would like to know is why they are considered bad? I'm not referring to...
2
by: Martin Høst Normark | last post by:
Hi everyone Has anyone got the least experience in integrating the Digital Signature with an ASP.NET Web Application? Here in Denmark, as I supose in many other countries, they're promoting...
13
by: Lorne Smith | last post by:
Hi, First, sorry for the crosspost, but it seemed appropriate... :) I've come accross what I consider to be a bug, but I don't know if it's already known or not. (VS .Net 2003 Pro - VB.Net) ...
7
by: Sam | last post by:
Hello All, We want our Call Service Representatives to be able to go back and view all the records in a table on a form. When closing and re-opening the form the form starts out as record 1 of 1...
2
by: Robert | last post by:
I am trying to give the user dynamic search capabilities to select almost any record in the database from criteria they select. Everything seems to work except when I open the display form to...
34
by: davehowey | last post by:
I have a problem. I'm writing a simulation program with a number of mechanical components represented as objects. When I create instances of objects, I need to reference (link) each object to the...
1
by: Alan | last post by:
I just installed MS Access 2002 on a new PC. On my old PC when I had a form up and held the mouse down on the backward and forward arrows to change the record, the records would fly by due to the...
1
by: beary | last post by:
I have a page with a form which has automatically generated fields, (which come from mysql column names). There could be any number of these fields, and I have no way of knowing exactly what they're...
0
by: miikka | last post by:
Is it possible to have dynamic update (preview) when re-sizing column in DataGridView?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.