andrewvmail Posted November 27, 2009 Share Posted November 27, 2009 Hi guys, I'm new to PHP and would like some help on how to solve this problem. I have a form which the variable of the form is not always the same depending on the user who logs in. For example user A might have a form with 8 fields to fill in and user B might have a form with 20 fields to fill in. On the form processing page I know I should have to have a loop that goes through all the post variable as a condition. insert $_POST[recid1], $_POST[Name] ....... insert $_POST[recid2], $_POST[Name2] Don't know where to start or is this even possible. Quote Link to comment https://forums.phpfreaks.com/topic/183089-php-form-processing-help/ Share on other sites More sharing options...
Cosizzle Posted November 27, 2009 Share Posted November 27, 2009 Sure it's possible, I would create an array of felids, or questions that need to be asked. I would then after $_POST is sent loop through that array Quote Link to comment https://forums.phpfreaks.com/topic/183089-php-form-processing-help/#findComment-966297 Share on other sites More sharing options...
mikesta707 Posted November 27, 2009 Share Posted November 27, 2009 Depending on the structure of your database, and how exactly the form is created for each user, an HTML array as Cosizzle suggested would probably be fine. However, without more information about your problem its hard to give much better advice than that Quote Link to comment https://forums.phpfreaks.com/topic/183089-php-form-processing-help/#findComment-966298 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.