Link to home
Start Free TrialLog in
Avatar of Stiebel Eltron
Stiebel EltronFlag for Thailand

asked on

How to add an action to our Activate part using ASP?

</head>

<body bgproperties="fixed" bgcolor="#000000" onLoad="javascript:startmenu()">

<%
	Dim myConnection
	Dim rsUsers
	Dim connectString
	Dim sqlString
	Dim requestName

	connectString = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=DBSERVER; PORT=3306; DATABASE=DB; USER=DBUSER; PASSWORD=DBPW; OPTION=0;"

	Set myConnection = Server.CreateObject("ADODB.Connection")
	Set rsUsers = Server.CreateObject("ADODB.Recordset")

	myConnection.Open connectString

	requestName = Request.Form("USERID")
	response.Write(requestName)

	sqlString = "Select * From users WHERE ID = 1"
	
	Set rsUsers = myConnection.Execute(sqlString)

%>

<table width="760" border="0" cellspacing="3" cellpadding="1">
  <tr>
    <td width="134"><img src="../IMG/logo_res.jpg" alt="STIEBEL ELTRON" /></td>
    <td width="620" valign="top" bgcolor="#666666"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="548" height="197">
      <param name="movie" value="homeintro20.swf" />
      <param name="quality" value="high" />
      <param name="wmode" value="opaque" />
      <embed src="homeintro20.swf" quality="high" wmode="opaque" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="548" height="197"></embed>
    </object></td>
    <td width="134" bgcolor="#FFFFFF"><img src="../IMG/RegIcon.png" alt="ASIA" border="0" align="top"/></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td align="right" bgcolor="#999999"><font face="Verdana, Geneva, sans-serif" color="#ffffff">
    <%
   '// If user is logged in show name and logout link
   If Session("loggedin") = true Then
      Response.Write "Welcome: " & Session("FName")
      Response.Write "<br /><a href=""../asia2/login/logout.asp"">Logout</a>"
   Else
      Response.Write "<a href=""../ste-iphoto-login2.asp"" title=""CLICK TO LOGIN"">REGISTERED USERS</a>"
   End If
	%>&nbsp;
	</td>
    <td bgcolor="#666666" align="center">&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td align="left" bordercolor="#999999" bgcolor="#000000"><img src="../IMG/member.jpg" width="548" /><br></td>
    <td bgcolor="#999999" valign="top" align="center" rowspan=13>&nbsp;
		
    </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>
    	<table width="100%" border="1" bordercolor="#cccccc" cellpadding="0" bgcolor="#999999">
    		<form name="form" id="form" method="post" action="#" onSubmit="return checkform(this)">
			<!--Get DATA-->
		<% do while not rsUsers.EOF %>
    		<tr>
        		<td class="td1" width="23%" align="right">First Name:</td>
           		<td class="td2" width="77%"><%=rsUsers("FName")%></td>
        	</tr>
    		<tr>
        		<td class="td1" width="23%" align="right">Last Name:</td>
           		<td class="td2" width="77%"><%=rsUsers("LName")%>
                </td>
        	</tr>
           	<tr>
        		<td class="td1" width="23%" align="right">Email:</td>
           		<td class="td2" width="77%"><%=rsUsers("Email")%>
            	</td>
        	</tr>

      
    		<tr>
        		<td class="td1" width="23%" align="right">Password:</td>
           		<td class="td2" width="77%"><%=rsUsers("Password")%>
                </td>
        	</tr>
        	<tr>
        		<td class="td1" width="23%" align="right">Country:</td>
           		<td class="td2" width="77%"><%=rsUsers("Country")%>
         	   </td>
        	</tr>
	        <tr>
    	    	<td class="td1" width="23%" align="right">Telephone:</td>
        	   	<td class="td2" width="77%"><%=rsUsers("Telephone")%>
                </td>
        	</tr>
        	<tr>
        		<td class="td1" width="23%" align="right">Mobile:</td>
           		<td class="td2" width="77%"><%=rsUsers("Mobile")%>
                </td>
        	</tr>
	    	<tr>
    	    	<td class="td1" width="23%" align="right">Company:</td>
        	   	<td class="td2" width="77%"><%=rsUsers("Company")%>
                </td>
        	</tr>
    		<tr valign="top">
        		<td class="td1" width="23%" align="right">Address:</td>
           		<td class="td2" width="77%"><%=rsUsers("Address")%></td>
        	</tr>
    		<tr valign="top">
        		<td class="td1" width="23%" align="right">Activate:</td>
           		<td class="td2" width="77%"><input type="radio" name="Activate" id="Yes"/>&nbsp;YES&nbsp;&nbsp;<input type="radio" name="Activate" id="No" />NO</td>
        	</tr>
            
	        <tr>
        		<td class="td" width="23%" align="right">&nbsp;</td>
           		<td width="77%"><input name="Submit" type="submit" value="UPDATE" onclick="return checkform();" />&nbsp;
                <input name="Delete" type="submit" value="DELETE" onclick="return checkform();" />
                </td>
        	</tr>
			


        </form>
        
       <% rsUsers.MoveNext %>
<%loop %><!--Next Row-->
    </table>

Open in new window


Dear EE experts,

Kindly see the attached embed script (same embed script from our another open thread, but different topic). We would like to ask on how to add an action for the Activate part... after activating the user, the status of the user from the MySql db should be change from "0" to "1".
At this moment, every new users, its status is set to "0", once activated, it will be changed to "1", so they can login.

Hope to hear soon...

Thank you!
ASKER CERTIFIED SOLUTION
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Stiebel Eltron

ASKER

Sorry for the delayed response, because out of office, anyway, we would like to give u points now then will open a new thread regarding this matter.

Thank you!