DonekalPooja Posted March 6, 2015 Share Posted March 6, 2015 In the file attached, there is a while loop in which am trying to display the records from a table and on each iteration a text field is also printed, which I have declared as an array 'marks[]'. Am stuck with the way how values are retrieved from those php printed text fields i.e., echo "<input type='text' name='marks[]'>"; Please help. Thanks in advance Facultymarks.php Quote Link to comment https://forums.phpfreaks.com/topic/295140-retrieving-and-storing-values-from-php-printed-text-fields/ Share on other sites More sharing options...
Ch0cu3r Posted March 6, 2015 Share Posted March 6, 2015 The data will be in $_POST['marks']. It will contain an array of all the values from the fields named as marks[] You can use print_r to output the structure of the array echo '<pre>' . print_r($_POST['marks'], 1) . '</pre>'; Quote Link to comment https://forums.phpfreaks.com/topic/295140-retrieving-and-storing-values-from-php-printed-text-fields/#findComment-1507754 Share on other sites More sharing options...
DonekalPooja Posted March 6, 2015 Author Share Posted March 6, 2015 Thanks for the reply. But this displays an error in the page I posted the marks array to, that says :Undefined index : marks Quote Link to comment https://forums.phpfreaks.com/topic/295140-retrieving-and-storing-values-from-php-printed-text-fields/#findComment-1507760 Share on other sites More sharing options...
DonekalPooja Posted March 6, 2015 Author Share Posted March 6, 2015 Thanks a lot..It's working now. Tried in d same way as u told . Thankuu Quote Link to comment https://forums.phpfreaks.com/topic/295140-retrieving-and-storing-values-from-php-printed-text-fields/#findComment-1507762 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.