php - Deleting rows from table on web retrieved from database -
I am having trouble removing rows from a database that I have seen on my website, Used and should be removed when multiplier is selected. But this is not happening just now! Nothing is going to be removed from the database! Please help! Firstly you can do all Sample code: And whenever you can still, use mysqli or PDO, anyway & lt; form method = "" action = "tester.php" & gt; & Lt ;? Include php 'connect_to_mysql.php'; $ Count = 0; $ = Mysql_num_rows ($ result) count; $ Result = mysql_query ("Choose from the booking order by the ADC select"); Akho "& lt; Table border = '1' & gt; & lt; tr & gt; <<>
SQL: $ sql
implode () Forms gathered from the form AIDS and the query from there.
& lt; Form method = "POST" action = "index.php" & gt; & Lt; Table & gt; & Lt ;? Php while ($ row = mysql_fetch_array ($ result)):? & Gt; & Lt; TR & gt; & Lt; Td> & Lt; Input type = "checkbox" name = "delete _these []" value = "& lt ;? php echo $ row ['id'] ;? gt;" / & Gt; & Lt; / TD & gt; & Lt; Td> & Lt ;? Php echo $ line ['name']; ? & Gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt ;? Php timeline; ? & Gt; & Lt; / Table & gt; & Lt; Input type = "submit" name = "delete" value = "delete selected" / & gt; & Lt; / Form & gt; & Lt ;? Php $ selected_values = array (); If (isset ($ _ POST ['delete'])) {$ select_values = $ _POST ['delete_these']; $ Id = intestine (',', $ selected_valued); $ Query = mysql_query ("Remove id id ($ id) from booking"); // it gets - & gt; Remove from booking where id (1, 2, 3, ...)}? & Gt;
Comments
Post a Comment