Duresh Posted July 10, 2009 Share Posted July 10, 2009 hi... I created the following code for get mysql table data into html drop down list using PHP. now i want to delete selected list value data from the original my sql table... how can i do that...? when i call the option value its always display the last record of the table... how can i delete selected record only..from the mysql table... <form name="year_search_form" method="post" action="results.php"> <select name="select_year" id="select_year"> <? $query="SELECT * FROM table ORDER BY year"; $result = mysql_query($query) or die ("Error in query: $query. " ..mysql_error()); while ($line = mysql_fetch_array($result)) { print ("<OPTION value=".$line['year']."></OPTION>"); } ?> </select> </form> Link to comment https://forums.phpfreaks.com/topic/165522-get-table-details-into-list-using-php-and-want-to-delete-selected-from-table/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.