0
New Here
,
/t5/dreamweaver-discussions/update-record-parameter-variable-sql-injection/td-p/368383
Jul 16, 2006
Jul 16, 2006
Copy link to clipboard
Copied
Hello...Please advise how to correct code... The update
record field recordcurrent is a y/n checkbox field with radio
buttons for selecting response with default as N. Here is the code
that has an error:
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param11", 5, 1, -1, MM_IIF(Request.Form("RecordCurrentCheck"), Request.Form("RecordCurrentCheck"), null)) ' adDouble
The code for the recordset follows:
<input <%If (CStr((eprofile.Fields.Item("RecordCurrent").Value)) = CStr("Y")) Then Response.Write("checked=""checked""") : Response.Write("")%> type="radio" name="RecordCurrentCheck" value="Y">
Yes
<input <%If (CStr((eprofile.Fields.Item("RecordCurrent").Value)) = CStr("N")) Then Response.Write("checked=""checked""") : Response.Write("")%> type="radio" name="RecordCurrentCheck" value="N"checked>
Should there be a second createparameter based on there being two buttons?
Thank you for your assistance,
Much confused one,
Lara
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param11", 5, 1, -1, MM_IIF(Request.Form("RecordCurrentCheck"), Request.Form("RecordCurrentCheck"), null)) ' adDouble
The code for the recordset follows:
<input <%If (CStr((eprofile.Fields.Item("RecordCurrent").Value)) = CStr("Y")) Then Response.Write("checked=""checked""") : Response.Write("")%> type="radio" name="RecordCurrentCheck" value="Y">
Yes
<input <%If (CStr((eprofile.Fields.Item("RecordCurrent").Value)) = CStr("N")) Then Response.Write("checked=""checked""") : Response.Write("")%> type="radio" name="RecordCurrentCheck" value="N"checked>
Should there be a second createparameter based on there being two buttons?
Thank you for your assistance,
Much confused one,
Lara
TOPICS
Server side applications
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
New Here
,
Jul 18, 2006
Jul 18, 2006
Thank you so much for your reply...I endedup changing the
data format completely to enter the current date the record is
updated! Working now, but i'm going to save your note for other
pages with radiobuttons.
Mucho Gracie,'
Lara
Mucho Gracie,'
Lara
Explorer
,
/t5/dreamweaver-discussions/update-record-parameter-variable-sql-injection/m-p/368384#M150568
Jul 17, 2006
Jul 17, 2006
Copy link to clipboard
Copied
Try...
<input <%If (CStr((eprofile.Fields.Item("RecordCurrent").Value)) = CStr("Y")) Then Response.Write("checked='checked'")%> type="radio" name="RecordCurrentCheck" value="Y"> Yes
<input <%If (CStr((eprofile.Fields.Item("RecordCurrent").Value)) = CStr("N")) Then Response.Write("checked='checked'")%> type="radio" name="RecordCurrentCheck" value="N"> No
<input <%If (CStr((eprofile.Fields.Item("RecordCurrent").Value)) = CStr("Y")) Then Response.Write("checked='checked'")%> type="radio" name="RecordCurrentCheck" value="Y"> Yes
<input <%If (CStr((eprofile.Fields.Item("RecordCurrent").Value)) = CStr("N")) Then Response.Write("checked='checked'")%> type="radio" name="RecordCurrentCheck" value="N"> No
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
New Here
,
LATEST
/t5/dreamweaver-discussions/update-record-parameter-variable-sql-injection/m-p/368385#M150569
Jul 18, 2006
Jul 18, 2006
Copy link to clipboard
Copied
Thank you so much for your reply...I endedup changing the
data format completely to enter the current date the record is
updated! Working now, but i'm going to save your note for other
pages with radiobuttons.
Mucho Gracie,'
Lara
Mucho Gracie,'
Lara
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

