<CFCOOKIE NAME = "Name" Value = "Value" Expires = "Expiration Date">
An expiration date can be a definite date, such as "3/9/81", it can be a relative number of days "100" or it can be "Now" or "Never." Also in addition to the above there are some optional attributes to the CFCOOKIE tag. By including the word SECURE with no argument you specify that the cookie needs to be sent securely using SSL, if SSL is not available the cookie is not sent. By including DOMAIN (Domain = "websitepublisher.net") you can specify the domains the cookie applies to, and by including PATH you can specify the subset of the URL to which the cookie applies, when using PATH, DOMAIN is required.
This section will cover advanced aspects of SQL that refine and expand what you can do with your database.
1. Adding Data
To add data to your database you will use the INSERT SQL statement.
INSERT INTO Friends(Name, Sex, FavMovie) VALUES (Chris, Male, Braveheart)
How it works is you specify the table you wish to insert into, in our case "Friends", and then the columns in parenthesis. On the next line you specify the values in much the same way. The order the values are listed must match with the order the columns are listed. You can also make this insert statement dynamic.
INSERT INTO Friends(Name, Sex, FavMovie) VALUES (#name#, #sex#, #movie#)
As was shown in the first part of this article, any aspect of the SQL Statement can be replaced with form input, this holds for the INSERT statement. Most database driven websites have an admin section using dynamic statements like this to add new content.