Jump to content

Update button


austine_power007

Recommended Posts

I am using table to show user data but now i place a button when user click that button it make the selected table field changble (mean i have a column named Completed and user insert data is % of completion) so when user click that edit it makes that field a drop down menu and user select and then it update the database ....how can i link a php code with that button??? below is the table sample

[attachment deleted by admin]
Link to comment
https://forums.phpfreaks.com/topic/30324-update-button/
Share on other sites

[code]echo"
  <tr> 
    <td style=color:blue width='139' height='26'><div align='left'><strong>$titl</strong></dv></td>
    <td style=color:blue width='80'><div align='center'><strong>$start</strong></dv></td>
    <td style=color:blue width='94'><div align='center'><strong>$end</strong></dv></td>
    <td style=color:blue width='91'><div align='center'><strong>$actual</strong></dv></td>";
   
print "<td style=color:blue width='74'><div align='center'> <SELECT NAME='title'>";
               
                    print "<OPTION VALUE='".$row["complete"]."'>".$row["complete"]." </OPTION> ";

                print "</SELECT></dv></td>";

echo" <td style=color:blue width='237'><div align='left'><strong>$remark</strong></dv></td>
<td style=color:blue width='60'><input type='submit' name='Submit' value='Submit' /></td>
  </tr> ";  [/code]

this is only for one condition i have more condition but when i click the edit button it change the column complete as a text field but i want only that row in which user click the edit button.
Link to comment
https://forums.phpfreaks.com/topic/30324-update-button/#findComment-139543
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.