How to update specified row in html table using php -


i have table employee in database. able add, fetch , display each row in table in html table dynamically using php.

<a href='add-employee.php' style='float:right;'>add employee</a>  <table class="table table-responsive">       <thead>            <th><strong>employee id</strong></th>            <th><strong>last name</strong></th>            <th><strong>first name</strong></th>            <th><strong>department</strong></th>            <th><strong>position</strong></th>            <th><strong>telephone</strong></th>       </thead>       <tbody>            <?php             $load_employees = mysql_query("select * tbl_employee");            $loaded_employees = mysql_num_rows($load_employees);                while($y=mysql_fetch_array($load_employees)){                     $emp_id = $y['emp_id'];                     $last = $y['emp_lname'];                     $first = $y['emp_fname'];                     $department = $y['emp_department'];                     $position = $y['emp_pos'];                     $tel = $y['emp_tel'];                      echo "<tr>                             <td>$emp_id</td>                             <td>$last</td>                             <td>$first</td>                             <td>$department</td>                             <td>$position</td>                             <td>$tel</td>                           </tr>";                 }           ?>                                     </tbody 

my problem wasn't able update specified row in html table. happen let's example there 5 entries in table means 5 rows, when user clicks on row , pass emp_id primary key each row , redirect update-emp.php page contains form updating row.


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -