O'Reilly logo

Practical Web Technologies by V. Lau, P. K. Yuen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

18.5. Designing database applications with PHP (II)

18.5.1. Deleting records from a table

From the SQL discussion earlier in section 18.2, you learned that the following SQL statement can be used to remove a record from a table:

   DELETE FROM ... WHERE ...

To integrate this statement into a Web page, let’s develop a PHP page to delete records from a MySQL table. This page will display all records and each record has an underlined text DELETE attached to it. To delete a record, all you have to do is to click on the underlined text. The new record will be updated automatically. The coding of the page is listed below:

Example. ex18–52.php – Deleting Records From A Table
 1: <?PHP echo"<?";?>xml version="1.0" encoding="iso-8859–1"<?PHP echo"?>";?> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required