Hi,
My task is, an excel file contains some records, where the first row has the headings and bellow that following are the corresponding records, in a form when the excel file is uploaded the fist row headings should be binded to the drop down list in the form, and when we click the drop down and select the elements, the selected element should appear in the text area.
i have searched in Google on how to bind data in php, but all in vain, kindly provide me solution
How to bind data in php
Moderator: General Moderators
Re: How to bind data in php
Doesn't look like you searched very hard for this solution... there are sites with info on how to do this all over. You'll need to parse the file for the data then do whatever you need to with it, store it in a database or a file, whatever.
Try this link: http://www.ibm.com/developerworks/opens ... index.html
Try this link: http://www.ibm.com/developerworks/opens ... index.html
Re: How to bind data in php
ok thanks for the reply, any idea on how to bind the parsed data to drop down
Re: How to bind data in php
If you've read the data into an array then all you need to do is iterate through the array and create a select box with the values of the array inside as the options.
Code: Select all
<?php
echo "<select name=\"cell_" . $x . "_" . $y . "\">";
foreach($array as $key => $value)
echo "<option value=\"" . $key . "\">" . $value . "</option>";
echo "</select>";
?>