Jump to content

Get table details into list using php and want to delete selected from table.


Duresh

Recommended Posts

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>

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.