Jump to content

dilmerchant

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

dilmerchant's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for the replies, Maybe I will get a better solution if I elaborate the problem a little more. So here goes.... The form has 4 columns : An application ID, UploadedBy, Date and Time. The application ID is simply printed as per value from the database. The UploadedBy field is a selection box. The first selection is displayed as per the value in the Database. Same is the case with Date and Time. Since these values are retrieved from the database, I have a while loop while($row = mysql_fetch_array($result)) { $app_id = $row['app_id']; $queryName = "SELECT name FROM users"; $resultQueryName = mysql_query($queryName) or die('Error, query failed'); echo "<tr class='alt' align='center'>"; echo "<td><input type='checkbox' name='periods[]' value='".$row."'/></td>"; echo "<td>"; echo $row['app_id']; echo "</td>"; } There is a button which has to be clicked to submit all the values if they are changed, only if checkbox is checked. The values have to be retrieved in the next page. So each row is stored in an array. Is this possible in any way?
  2. Thanks for the reply, The value is supposed to be $row
  3. Hello All, I am a newbie and have been trying to send a complete array as a checkbox value, but cannot do so. The problem : I have a form which has multiple rows. These rows are displayed from gathering data from mysql database tables. Below is the code I am trying. while($row = mysql_fetch_array($result)) { $id = $row['id']; $queryName = "SELECT name FROM users"; $resultQueryName = mysql_query($queryName) or die('Error, query failed'); echo "<tr class='alt' align='center'>"; echo "<td><input type='checkbox' name='chkbox[]' value='".$row."'/></td>"; After submitting the form, I tried checking for the values and retrieving them foreach($_POST['chkbox'] as $value) { echo $value; } $value shows an array, but if I try applying the foreach loop on $value, then it gives an error.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.