Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.