diaplay data in tabular manner in php form

Rasyjesttem

New Member
i want to do something like this..i have a update form in php, which contains around 15 fields,i want to show some data in tabular mannar while u open the page for update..Senario: if u want to update a record of a person on day to day basis, i have the feature with me to search out that person form database, and when u click on update data..it should show in a manner that, field1.....----------
field2.....----------
field3.....---------- and now,for field4,5,6,7if these fields contain the data then show in a table manner with fields 4,5,6,7 as coloums and no of rows depending upon the number of entries (should be non editable)(assume the case of multiple input)then form will continue.
field4.....--------
field5.....--------
field6.....--------
field7.....-------- typically these field(4,5,6,7) gets their value update frequently and i have to maintain the previous inputs also.help me out with some solution,as i am unable to figure out how to do this?? before that i was using this.. here i was having a form field which can generate 5 options, and will populate the fields with data if u have entered before, now i want to change the display as i dont want user to play with the old data, so i want to show old data into a table and enter new data via a simple text field,as their is no point to keep these multiple input form field as user is updating only one value at a time.\[code\]<script> function Submitted_Date(value,object) { value = http://stackoverflow.com/questions/10259143/document.getElementById("subdate_num").value; if (value > -1) { var input= new Array(value); var p; //alert("Enter The fields You Know "); var ele = document.getElementById("subdate"); if(ele.hasChildNodes()) { var len = ele.childNodes.length; while(ele.childNodes.length - value > 1) { ele.removeChild(ele.lastChild); } } for (var i=len-1;i<value;i++) { p= i+1; input = document.createElement('div'); input.innerHTML = 'Submitted_Date' + p + ': &nbsp;&nbsp; <input type="text" value="" name="subdate' + p + '" id="subdate' + p +'" size = 25 onclick="javascript: showCalendar("Submitted_Date'+ p +'")"/>'; document.getElementById("subdate").appendChild(input); var subdate = 'subdate' + p; } } document.getElementById("subdate1").focus(); } </script> <tr> <td> Submitted Date : <select name="subdate_num" id="subdate_num" onChange="return Submitted_Date(this.value,this.form)"> <?php for ($i=0;$i<=5;$i++) { if ($i==0) { $temp = "<option value=http://stackoverflow.com/questions/10259143/$i> - </option>"; echo $temp; } else { $temp = "<option value=http://stackoverflow.com/questions/10259143/$i>$i</option>"; echo $temp; } } ?> </select></td> </tr> </table>\[/code\] \[code\]<table>\[/code\]
 
Top