473,394 Members | 2,100 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,394 software developers and data experts.

Form submission same field, multiple values

59
Here in a form i have the following. note: the following is a result of dynamic html element creation.

Expand|Select|Wrap|Line Numbers
  1. <input type="hidden" name="category" value="science" />
  2. <input type="hidden" name="permission" value="normal" />
  3.  
  4. <input type="hidden" name="category" value="clubs" />
  5. <input type="hidden" name="permission" value="vip" />
  6.  
  7. <input type="hidden" name="category" value="cartoon" />
  8. <input type="hidden" name="permission" value="standard" />
on form submission i want to assign values of the field 'category' in a array $category and the values of the field 'permission' in array $permission.

How can i go about doing this? thanks :)
Oct 9 '07 #1
3 1507
Atli
5,058 Expert 4TB
Hi.

You should be able to create an array somewhat like this:
Expand|Select|Wrap|Line Numbers
  1. <input type="text" name="textInput[]" /><br />
  2. <input type="text" name="textInput[]" /><br />
  3. <input type="text" name="textInput[]" /><br />
  4. <input type="text" name="textInput[]" /><br />
  5.  
By adding a [] to the name.
Oct 9 '07 #2
cssExp
59
thanks it works great :)
Oct 9 '07 #3
Atli
5,058 Expert 4TB
Glad I could help :)
Oct 9 '07 #4

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

Similar topics

2
by: Colin Steadman | last post by:
Part No Description Quantity 45643 Random part 10 45678 Another Random part 7 98944 And another 1 <submit button> ...
2
by: Logical | last post by:
I have a form which houses basic inputs, as well as a few multiple select forms. I need to parse all the 'values' which are in this multiple select form (it gets manipulated dynamically client...
3
by: Jack | last post by:
Hi, I have a asp input form of a financial report. Here most of the fields are text boxes where the user need to input the values corresponding to an item. However, there are few items which are...
1
by: googleboy | last post by:
Hi. I am writing up my own web form. I'm a bit of a newb, and read up many different how-tos and examples and documentaion. I finally had it working just great until I decided that I wanted to...
10
by: Mr Newbie | last post by:
DropDown lists and Listboxes do not appear in the list of controls and values passed back to the server on PostBack in Request.Form object. Can someone confirm this to be correct and possibly...
9
by: julie.siebel | last post by:
Hello all! As embarrassing as it is to admit this, I've been designing db driven websites using javascript and vbscript for about 6-7 years now, and I am *horrible* at form validation. To be...
4
by: kschneider | last post by:
Assume there's a form with it's action attribute all set to post to a URL, but without a submit control. Form submission is done via a link and I want to prevent the classic "double submit"....
0
by: oh4real | last post by:
I recently developed a compact function to efficiently allow users to change info in a form (like account info, contact info, etc.) and then the function automatically identifies what's changed and...
7
by: cartercc | last post by:
I think I already know the answer to this one, but I'm giving it the old college try. My problem is this: I have an HTML form that sends a bunch of data to a Perl script, where it is validated...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.