Jump to content

deleting selected items


kundan

Recommended Posts

hello sir,

 

    I am displaying the records of mysql table in php and placed checkboxes to delete the selected items

i have tried with the issue but in vain .

could you  please help me how to delete the selected records either with in the same page or by redirecting to another page

 

Thanks in advance

 

kundan :)

Link to comment
https://forums.phpfreaks.com/topic/139657-deleting-selected-items/
Share on other sites

This is mysql command:

 

mysql_connect("localhost", "user", "pass") or die(mysql_error());
mysql_select_db("dbname") or die(mysql_error());

// Delete row where 15 from the "example" MySQL table
mysql_query("DELETE FROM example WHERE anything='15'") 
or die(mysql_error()); 

echo "cool! all done";

 

Give me a table name and column names and ill adjust this for u

i hav followed with the give link and gone with the same example

i created the same example table with the given database name and i was able to display the data but when i selected any record and clicked on delete button nothng was happenning and the checked checkboxes were made unchecked

 

kundan

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.