newb, i am connecting to database then accessing a table and printing whole table on php page as table with "delete" button at the end of every row (so same delete button being printed many times).
want i want to do is if a user to be able to click on any delete button and that row data get deleted from database and reload the page with updated table.
i can print the table with data and "delete " button at the end but only first button works, but no data being passed so the delete query does not work ..
all the other buttons you can press but they do not respond
here is codes for printing form and table
Expand|Select|Wrap|Line Numbers
- <form action='viewcatalogues.php' method='post' enctype='multipart/form-data'>";
- while($data = mysql_fetch_assoc($getdata))
- {
- echo "
- <tr>
- <td>".$data['cat_id']."</td>
- <td>".$data['catalogue_name']."</td>
- <td>".$data['file_name']."</td>
- <td><a href='".$data['sale_setup']."'>".$data['sale_setup']."</a></td>
- <td>".$data['arrival']."</td>
- <td>".$data['copy_retail']."</td>
- <td>".$data['image_cata']."</td>
- <td>".$data['due']."</td>
- <td>".$data['status']."</td>
- <td><input type='submit' name='delete' value='del' ></td>
- </tr>";
- echo "
- </form>";
please help