473,387 Members | 1,548 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,387 software developers and data experts.

how to select post values in php when it in loop

the following code is in loop of variable $name;
I want to collect $_POST['comment'] value for particular variable $name when submit button hit.

Expand|Select|Wrap|Line Numbers
  1. <input type="hidden" name="name" value="<?php echo $name; ?>" />
  2.  <textarea name="Comment"> </textarea>
  3.  <input type="submit" name="submit" value="Add Comment" style="margin-left: 225px;"/>
Dec 23 '11 #1

✓ answered by Dormilich

if that HTML code occurs repeatedly in your form, then only the last instance will be available (because all the previous values were overwritten).

also note that $_POST['comment'] does not equal $_POST['Comment'] (PHP is case-sensitive for variable/key names).

2 1744
Dormilich
8,658 Expert Mod 8TB
if that HTML code occurs repeatedly in your form, then only the last instance will be available (because all the previous values were overwritten).

also note that $_POST['comment'] does not equal $_POST['Comment'] (PHP is case-sensitive for variable/key names).
Dec 23 '11 #2
yes u r right but ,

how can i obtain textarea value , when perticular submit button is click....?
Dec 26 '11 #3

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

Similar topics

8
by: dmcconkey | last post by:
Hi folks, I have a client with four websites. Each site has a contact form that is identical. They all have "required" fields validated through a JavaScript onSubmit() function. Upon validation,...
0
by: Toby | last post by:
Dear All, I wounder whether some of the experts out there might be able to help me with a problem I'm having. I do not know whether this is possible or not... I have a large table of stock...
4
by: LD | last post by:
Is there a way in Access to store more than one value in a field that has been selected from a combo box? For example, if a combo box had three values that you can select, "One", "Two", and...
2
by: DC Gringo | last post by:
I have two listboxes, the first of which is an autopostback=true that allows multiple row selection. When I select multiple values (by holding down CTL) in the first one, it should query the...
6
by: guoqi zheng | last post by:
In a regular html form, when user press "enter" key, the form will be submitted. However, in ASP.NET web form, a form will only be submitted (post back) when a special button is clicked. Many...
23
by: Bjorn | last post by:
Hi. Every time i post data in a form the contents are being checked for validity. When i click the back-button, all data is gone and i have to retype it. It's obvious that only a few or none of...
6
by: trevor | last post by:
Incorrect values when using float.Parse(string) I have discovered a problem with float.Parse(string) not getting values exactly correct in some circumstances(CSV file source) but in very similar...
0
by: phpinfo | last post by:
How to send post values from command line program in php? The values need to be sent to php script on a different site
4
by: ataurrehman | last post by:
I want to use select case in a loop as under: Dim i As Integer i = 1 While i < 6 Select Case Field1 Case "Title" strFld(i) = "( & ': ' & )" Case "Author" strFld(i) = "( & ', ' &...
5
by: sarayu | last post by:
Hi All, How can i select multiple values in a form without using options.I want to select more than one image from a table and submit those selected values as a request to the next page.I don't...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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.