Click here to Skip to main content
15,885,244 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
GeneralRe: breadcrumbs Pin
AndyInUK1-Dec-10 5:48
AndyInUK1-Dec-10 5:48 
GeneralRe: breadcrumbs Pin
Luc Pattyn1-Dec-10 6:15
sitebuilderLuc Pattyn1-Dec-10 6:15 
GeneralRe: breadcrumbs [modified] Pin
cjoki2-Dec-10 6:29
cjoki2-Dec-10 6:29 
AnswerRe: breadcrumbs Pin
Christian Mattix18-Jan-11 9:27
Christian Mattix18-Jan-11 9:27 
Questionis (mySQL)INSERT function limited in the number of Variables and Values? Pin
bijan.8k24-Nov-10 9:40
bijan.8k24-Nov-10 9:40 
AnswerRe: is (mySQL)INSERT function limited in the number of Variables and Values? Pin
Luc Pattyn24-Nov-10 10:13
sitebuilderLuc Pattyn24-Nov-10 10:13 
AnswerRe: is (mySQL)INSERT function limited in the number of Variables and Values? Pin
cjoki24-Nov-10 11:07
cjoki24-Nov-10 11:07 
QuestionHow to iterate form-fields on a page and send them to database? [modified] Pin
jasonmp20-Nov-10 16:26
jasonmp20-Nov-10 16:26 
I am trying to submit a form on my page. It's proving to be a very difficult and frustrating task.

The problem is that there is no way of telling how many 'fields' will need to be submitted. The user might add 50 products to the cart, and make 30 changes to the quantities, or they might add 600 products to the cart and make 599 changes to the quantities (you never know), and with this website, the client is expecting high volume of sales so I need to be prepared for cases such as that.

I have a Table (a script that I bought) which has its own form tag for the data inside the table, however it uses GET not POST. And I am using:

foreach($_GET['items'] as $p=>$q) 
{ 
   // Update in database. This sql query has been tested, so I know it works, which means that the problem lies within the foreach loop, since it only stopped working when I added the foreach loop to update all form fields. 
} 


But I dont know how to do this. I have tried hundreds of variations of the above snip and NOTHING has worked for me.

I have searched all ovver php.net, google and am out of ideas, and would greatly appreciate anyone's advice or help.

How can I update ALL form fields to the database?



Thanks

Edit:

The result of
print_r($_GET); 
is:

Array ( [ct_items_per_page] => 10 [ct_sort] => t_t_t_t [ct_page] => 1 [ct_search] => [ct_items_per_page_change] => all [ct_multiple_search] => Array ( [0] => [1] => [2] => [3] => ) [product] => M5 x 1 MTR Allthread (Grade 304 Unit Price) [items] => Array ( [1] => 45 ) )

Edit:

What else would work in my situation? Does anyone have any links/tutorials/articles? I cannot find anything anywhere. Are there other ways to submit all fields to a database?

modified on Monday, March 28, 2011 1:18 AM

AnswerRe: How to iterate form-fields on a page and send them to database? Pin
cjoki22-Nov-10 4:49
cjoki22-Nov-10 4:49 
QuestionHow to GET embedded video by using an URL which has embedded video? Pin
nicholasng20-Nov-10 15:40
nicholasng20-Nov-10 15:40 
Questionhow to implement indian payment gateway Pin
pallavi shrivastava16-Nov-10 18:29
pallavi shrivastava16-Nov-10 18:29 
QuestionRe: how to implement indian payment gateway Pin
Gerben Jongerius16-Nov-10 20:23
Gerben Jongerius16-Nov-10 20:23 
QuestionHow to convert php script to .exe Pin
udch12-Nov-10 23:54
udch12-Nov-10 23:54 
AnswerRe: How to convert php script to .exe Pin
cjoki15-Nov-10 4:37
cjoki15-Nov-10 4:37 
AnswerRe: How to convert php script to .exe Pin
Mohamed7IBrahim18-Nov-10 3:21
Mohamed7IBrahim18-Nov-10 3:21 
GeneralRe: How to convert php script to .exe Pin
cjoki18-Nov-10 5:27
cjoki18-Nov-10 5:27 
AnswerRe: How to convert php script to .exe [modified] Pin
DaveX8622-Nov-10 7:32
DaveX8622-Nov-10 7:32 
QuestionSending FILE post data through PHP code Pin
Yulianto.10-Nov-10 18:55
Yulianto.10-Nov-10 18:55 
AnswerRe: Sending FILE post data through PHP code Pin
cjoki12-Nov-10 4:22
cjoki12-Nov-10 4:22 
AnswerRe: Sending FILE post data through PHP code Pin
Graham Breach12-Nov-10 4:37
Graham Breach12-Nov-10 4:37 
QuestionRedirect after execution Pin
cryptoknight179-Nov-10 6:43
cryptoknight179-Nov-10 6:43 
AnswerRe: Redirect after execution Pin
fly9049-Nov-10 7:26
fly9049-Nov-10 7:26 
GeneralRe: Redirect after execution Pin
cjoki9-Nov-10 10:57
cjoki9-Nov-10 10:57 
AnswerRe: Redirect after execution Pin
jaypatel51214-Nov-10 8:42
jaypatel51214-Nov-10 8:42 
QuestionWant to hire a code? Pin
Noman Rasheed7-Nov-10 11:22
Noman Rasheed7-Nov-10 11:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.