in reply to CGI and Database

Provided your script knows how to map the value of the name parameter to the key value of the record you want to delete, you are on the right track.

It is of course a very unsecure way of allowing users to delete records from your database. Anyone can just type the URL into the address-bar and change the value in the name=.... parameter and thus delete someone else's records.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Replies are listed 'Best First'.
Re^2: CGI and Database
by mccolgst (Initiate) on Feb 10, 2009 at 15:56 UTC
    I did end up messing around with the code and got it to work, and now I understand how it is insecure. Thanks a lot for the help guys.