Question
simple cfinsert not working
i'm really pulling my hair out now!
normally i build an html form and let dw create the cf code to insert the forms contents into my access db, ive done this loads of times, however today it does not want to work. ive scrapped the dw code and written my own to make it smaller and easier to read (this code still doesnt work). i have posted the cf code below
<cftransaction>
<cfquery name="insert_new_admin" datasource="allieddatabase">
INSERT INTO users1 (name, department, username, password, confirmpassword}
VALUES ('new_admin_user.name', 'new_admin_user.department', 'new_admin_userusername', 'new_admin_user.password', 'new_admin_user.confirmpassword')
</cfquery>
</cftransaction>
and here is the html code:
<form action="newadminaction.cfm" method="POST" name="new_admin_user">
<label for="name">Name</label>
<input type="text" name="name" id="name">
<label for="department">Department</label>
<select name="department" id="app_select">
<option selected>OPS</option>
<option>Sales</option>
<option>Accounts</option>
<option>P&W</option>
<option>General management</option>
</select>
<label for="username">user name</label>
<input type="text" name="username" id="username">
<label for="password">Password</label>
<input type="text" name="password" id="password">
<label for="confirmpassword">Confirm Password</label>
<input type="text" name="confirmpassword" id="confirmpassword">
<label for="level">Level</label>
<select name="level" id="app_select">
<option selected>1</option>
<option>2</option>
<option>3</option>
<option>999</option>
</select>
<br>
<input name="Submit" type="submit" id="submit_button" value="Submit">
<input type="hidden" name="MM_InsertRecord" value="new_admin_user">
</form>
all i get is this:
Syntax error in INSERT INTO statement.
with lots of other stuff underneith it
tried loads of different combinations, has anyone got any ideas?
normally i build an html form and let dw create the cf code to insert the forms contents into my access db, ive done this loads of times, however today it does not want to work. ive scrapped the dw code and written my own to make it smaller and easier to read (this code still doesnt work). i have posted the cf code below
<cftransaction>
<cfquery name="insert_new_admin" datasource="allieddatabase">
INSERT INTO users1 (name, department, username, password, confirmpassword}
VALUES ('new_admin_user.name', 'new_admin_user.department', 'new_admin_userusername', 'new_admin_user.password', 'new_admin_user.confirmpassword')
</cfquery>
</cftransaction>
and here is the html code:
<form action="newadminaction.cfm" method="POST" name="new_admin_user">
<label for="name">Name</label>
<input type="text" name="name" id="name">
<label for="department">Department</label>
<select name="department" id="app_select">
<option selected>OPS</option>
<option>Sales</option>
<option>Accounts</option>
<option>P&W</option>
<option>General management</option>
</select>
<label for="username">user name</label>
<input type="text" name="username" id="username">
<label for="password">Password</label>
<input type="text" name="password" id="password">
<label for="confirmpassword">Confirm Password</label>
<input type="text" name="confirmpassword" id="confirmpassword">
<label for="level">Level</label>
<select name="level" id="app_select">
<option selected>1</option>
<option>2</option>
<option>3</option>
<option>999</option>
</select>
<br>
<input name="Submit" type="submit" id="submit_button" value="Submit">
<input type="hidden" name="MM_InsertRecord" value="new_admin_user">
</form>
all i get is this:
Syntax error in INSERT INTO statement.
with lots of other stuff underneith it
tried loads of different combinations, has anyone got any ideas?