Membership
Main Menu
Forum Boards
Stats
- 18 tutorials
- 72,338 members
- 696,815 forum posts
- 11 blog posts
Tutorials
PHP Basic Database Handling
by Crayon Violent on Jun 20, 2008 2:06:06 PM
Views: 57649
Dealing With The Database: DELETE
In this block of code, we will delete a name from the table.
02. Our form is setup to have a "delete" link next to each name. You simply click on the link and the name is deleted. Since it's a link, we pass the name through the url via the GET method. So the first thing we do is check to see if that variable exists. If it does...
04. Once again we sanitize the variable.
06. We build the query string, inserting the name in the string with $name.
07. We send the string off to the database to be executed. Again, no reason to really assign the result to $result in this example.
Comments
1. fearlex on Jun 27, 2008 3:54:27 PM
2. peteschulte on Jul 23, 2008 6:36:06 PM
3. Crayon Violent on Jul 26, 2008 3:02:30 PM
4. deepshah on Aug 11, 2008 2:05:41 AM
5. ma2tt on Aug 16, 2008 10:29:59 AM
Login or register to post a comment.
