/ Published in: ColdFusion
Expand |
Embed | Plain Text
<cfquery datasource="turpinsshoutbox" username="root"> INSERT INTO comment(poster, email, msg) VALUES ('#Form.poster#', '#Form.email#', '#Form.msg#') </cfquery> <cflocation url="shoutbox.cfm" addToken="No">
Comments
Subscribe to comments
You need to login to post a comment.

You should use cfqueryparam to avoid SQL injection. Furthermore if #form.msg# contains a single quote it breaks the code.
The cfsqltype attribute in cfqueryparam is optional by the way :)
` INSERT INTO comment(poster, email, msg) VALUES (, , )
`
INSERT INTO comment(poster, email, msg) VALUES (, , )