![]() |
access database data insertion
I am currently trying to teach myself coldfusion and am having an issue getting the data to transfer through. any help would be appreciated.
none of the data goes through, but the database shows a null insertion. Quote:
|
You're going to get NULLs inserted as soon as you load the form in your browser, because you're setting all of your variables to default to empty strings. The INSERT statement is going to happen no matter what (i.e. it's not waiting for a form submission).
However, right now you can't even submit data from the form, because you don't have a <form> tag. The code should look something like below (much simplified; you can add whatever error checking you like). Also note that the <head> tag is not a displayable element, it just signifies a section for tags that the browser understands which are not displayed directly on the page (like the <title> tag to set the document title). Code:
<!--- Only do a database insert once the form has been submitted --->Also, you must learn to indent your code so that you know which tags are "children" of other tags. It makes the code MUCH more readable and understandable, and helps you get your markup correct so that you don't have unmatched start / end tags. -Greg |
ty for your help. I'm still really new to this so I appreciate your honesty and i will look over the changes that you have made.
|
| All times are GMT +1. The time now is 01:24 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.