Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2006

    Unanswered: need help with asp radio button

    hi.. can anyone help me with the following problem i've encountered..
    i'm doing a update members form.. whereby a member who is log in.. can change his subscription details for a newsletter.. but i hope to show his previous setting.. which is either a YES or a NO.. i cant seem to get it right.. can someone help me with this?

    <!-- #INCLUDE FILE="msado15.dll" --> 
    <!-- #INCLUDE FILE="" -->
    dim con,rs
    set con=Server.CreateObject("ADODB.Connection")
    set rs=Server.CreateObject("ADODB.Recordset")
    con.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("../database/Databasezz.mdb") & ";Persist Security Info=False"
    with rs
    	.open "select * FROM MemberInfo where Username='" & minfo & "'"
    end with
    <form name="form1" method="post" action="UpdateProfile.asp">
          <td width="238"><b>Nickname</b></td>
          <td width="206"><b><%=rs("Username")%></b>&nbsp;</td>
              <% if rs("ReceiveMail")=="Yes"  then  %>
    	     <input type="radio" name="newsletter" value="Yes" checked>Yes
    	     <input type="radio" name="newsletter" value="No">No
              <% else %>
    	     <input type="radio" name="newsletter" value="Yes">Yes
    	     <input type="radio" name="newsletter" value="No" checked>No
              <% end if %>
    <input type="submit" value="submit">
    Last edited by everytime; 07-01-06 at 17:11.

  2. #2
    Join Date
    Jul 2006
    <%if rs.Fields("ReceiveMail").Value = "Yes" then%>
        <input type="radio" name="Newzletter" value="Yes" echo checked>Yes
        <input type="radio" name="Newzletter" value="No">No
        <input type="radio" name="Newzletter" value="Yes">Yes
        <input type="radio" name="Newzletter" value="No" echo checked>No
    <%end if%>
    i've retrieved the value out.. but i'm not able to update the new newzletter option into the database.. due to something CheckedChanged event.. how do i go about it? can anyone enlighten me on this? btw.. i'm just using asp, not
    Last edited by everytime; 07-01-06 at 17:14.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts