Question

Login user after registering using Developer Toolbox ASP

Asked by: Andy6350

Hi,
I am currently having problems with an administration area i have created for a site, all my pages have been created with an ASP extension and i have used Developer Toolbox to create a login page, a registration page, and a admin area. However when the user fills out the form to register they get directed to the login page not straight to there admin area, its as if the page is not passing the correct security session variables across. I regret using the toolbox now as it seems to create a whole libery of files and seperates the code all over the place. I am sure that it is a simple fix however i am just not sure what code i am to put were.

I have attached the code of the file it created of which i assume contains the session variable information, the file is named tNG.config.inc.asp.

I really hope you can help to solve this issue,

Many Thanks
Andrew

<%
' Array definitions
  Set tNG_login_config = Server.CreateObject("Scripting.Dictionary")
  Set tNG_login_config_session = Server.CreateObject("Scripting.Dictionary")
  Set tNG_login_config_redirect_success = Server.CreateObject("Scripting.Dictionary")
  Set tNG_login_config_redirect_failed = Server.CreateObject("Scripting.Dictionary")
 
' Start Variable definitions
  tNG_debug_mode = "DEVELOPMENT"
  tNG_debug_log_type = ""
  tNG_debug_email_to = "you@yoursite.com"
  tNG_debug_email_subject = "(BUG) The site went down"
  tNG_debug_email_from = "webserver@yoursite.com"
  tNG_email_host = "192.168.1.79"
  tNG_email_user = "admin"
  tNG_email_port = "25"
  tNG_email_password = "spackman"
  tNG_email_defaultFrom = "nobody@nobody.com"
  tNG_login_config("connection") = "connMedac"
  tNG_login_config("table") = "tblRegistration"
  tNG_login_config("pk_field") = "UsrID"
  tNG_login_config("pk_type") = "NUMERIC_TYPE"
  tNG_login_config("email_field") = "txtUserEmail"
  tNG_login_config("user_field") = "txtUserEmail"
  tNG_login_config("password_field") = "txtUserPassword"
  tNG_login_config("level_field") = "intAccessLevel"
  tNG_login_config("level_type") = "NUMERIC_TYPE"
  tNG_login_config("randomkey_field") = ""
  tNG_login_config("activation_field") = ""
  tNG_login_config("password_encrypt") = "false"
  tNG_login_config("autologin_expires") = "30"
  tNG_login_config("redirect_failed") = "login.asp"
  tNG_login_config("redirect_success") = "admin.asp"
  tNG_login_config("login_page") = "index.asp"
  tNG_login_config_session("kt_login_id") = "UsrID"
  tNG_login_config_session("kt_login_user") = "txtUserEmail"
  tNG_login_config_session("kt_txtUserFirstName") = "txtUserFirstName"
  tNG_login_config_session("kt_txtUserEmail") = "txtUserEmail"
  tNG_login_config_session("kt_login_level") = "intAccessLevel"
  tNG_login_config_redirect_success("1") = "admin.asp"
  tNG_login_config_redirect_failed("1") = "login.asp"
  tNG_login_config_session("kt_txtUserPassword") = "txtUserPassword"
' End Variable definitions
%>
                                  
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:

Select allOpen in new window

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-09-23 at 12:21:42ID24756206
Tags

developer toolbox

,

ASP

,

registration

Topics

PHP and Databases

,

Adobe Dreamweaver

,

Active Server Pages (ASP)

Participating Experts
1
Points
500
Comments
5

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Dreamweaver Toolbox Upload in ASP. Error: 'Class not …
    Hey Experts!! I am using the Adobe Dreamweaver Developers Toolbox (ADDT) and so far I've had much success with it. I have an intranet that I am redesigning from the ground up. I do have several other pages where I am using the "upload" feature for ASP and it work...
  2. Chart Control for .NET Framework does not appear in the …
    I successfully upgraded to VS 2008 SP1 and ASP.NET SP1. Then I downloaded and installed the MS Chart for ASP.NET. The chart control does not appear in the toolbox. It does not appear in the ToolBox - Choose Items list. I also copied the System.Web.DataVisualization.Design....

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: RouchiePosted on 2009-09-25 at 03:47:36ID: 25421622

Hi there.

The admin page will check if the users had logged in, which it isn't finding, and therefore redirects to the login page.  I don't use the toolbox myself but know ASP well enough to help you out.

Can you post the code for the registration and log in pages please?  I'll take the code from the login page that registers somebody has logged in correctly, and apply this to the registration page.

Cheers.

 

by: Andy6350Posted on 2009-09-25 at 04:30:30ID: 25421924

Hi,

Thank you, i have attached two pieces of code, the first being for the login page, then a gap with the code for the registration page. Thank you so much

Andrew

<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/connMedac.asp" -->
<!--#include file="includes/common/KT_common.asp" -->
<!--#include file="includes/tNG/tNG.inc.asp" -->
<%
'Make a transaction dispatcher instance
Dim tNGs: Set tNGs = new tNG_dispatcher
tNGs.Init ""
%>
<%
' Start trigger
Dim formValidation: Set formValidation = new tNG_FormValidation
formValidation.Init
tNGs.prepareValidation formValidation
' End trigger
%>
<%
'Make a login transaction instance
Dim loginTransaction: Set loginTransaction = new tNG_login
loginTransaction.init MM_connMedac_STRING
tNGs.addTransaction loginTransaction
'Register triggers
loginTransaction.registerTrigger Array("STARTER", "Trigger_Default_Starter", 1, "POST", "kt_login1")
loginTransaction.registerTrigger Array("BEFORE", "Trigger_Default_FormValidation", 10, formValidation)
loginTransaction.registerTrigger Array("END", "Trigger_Default_Redirect", 99, "{kt_login_redirect}")
' Add columns
loginTransaction.addColumn "kt_login_user", "STRING_TYPE", "POST", "kt_login_user", ""
loginTransaction.addColumn "kt_login_password", "STRING_TYPE", "POST", "kt_login_password", ""
loginTransaction.addColumn "kt_login_rememberme", "CHECKBOX_1_0_TYPE", "POST", "kt_login_rememberme", "0"
'End of login transaction instance
%>
<%
'Execute all the registered transactions
tNGs.executeTransactions
%>
<%
'Get the transaction recordset
Dim rscustom
Dim rscustom_numRows
 
Set rscustom = tNGs.getRecordset("custom")
rscustom_numRows = 0
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Medac</title>
<!--[if IE]>
<style type="text/css" media="all">.borderitem {border-style:solid;}</style>
<![endif]-->
<style type="text/css">
<!--
a {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
}
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}
a:active {
	text-decoration: none;
}
-->
</style>
<script src="SpryAssets/SpryAccordion.js" type="text/javascript"></script>
<link href="SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
<link href="login.css" rel="stylesheet" type="text/css" />
<link href="includes/skins/mxkollection3.css" rel="stylesheet" type="text/css" media="all" />
<script src="includes/common/js/base.js" type="text/javascript"></script>
<script src="includes/common/js/utility.js" type="text/javascript"></script>
<script src="includes/skins/style.js" type="text/javascript"></script>
<% Response.Write tNGs.displayValidationRules()%>
</head>
 
<body class="AccordionPanelOpen">
<div id="Div2">
</div>
<div id="Div3">
</div>
<div id="index_r1_c1">
  <div id="search">
<form action="results.asp" method="get" target="_self" id="frmSearch">
  <label>
    <input name="search" type="text" class="searchField" id="search2" />
  </label>
  <label>
    <input type="submit" class="searchButton" value="Search"/>
  </label>
</form>
</div>
</div>
<div id="index_r1_c9">
</div>
<div id="index_r2_c1">
<span id="navbar"><a href="index.asp">Home</a> | <a href="about.asp">About us</a> | <a href="products.asp">Products</a> | <a href="contact.asp">Contact</a> | <a href="metoject.asp"> Metoject</a></span> </div>
<div id="index_r3_c1">
</div>
<div id="index_r4_c9">
</div>
<div id="index_r5_c1">
</div>
<div id="index_r5_c2">
  <form method="post" id="form1" class="KT_tngformerror" action="<%= KT_escapeAttribute(KT_getFullUri()) %>">
    <table cellpadding="2" cellspacing="0" class="loginTable">
      <tr>
        <td width="89" class="loginTableH1">Login</td>
        <td colspan="2">&nbsp;</td>
      </tr>
      <tr>
        <td class="KT_th"><label for="kt_login_user">Email:</label></td>
        <td width="90"><input name="kt_login_user" type="text" class="searchField" id="kt_login_user" value="<%=(KT_escapeAttribute(rscustom.Fields.Item("kt_login_user").Value))%>" size="32" /></td>
        <td width="159">&nbsp;</td>
      </tr>
      <tr>
        <td class="KT_th"><label for="kt_login_password">Password:</label></td>
        <td colspan="2"><input name="kt_login_password" type="password" class="searchField" id="kt_login_password" value="" size="32" /></td>
      </tr>
      <tr>
        <td class="KT_th"><label for="kt_login_rememberme">Remember me:</label></td>
        <td colspan="2"><input  <%If (CStr((KT_escapeAttribute(rscustom.Fields.Item("kt_login_rememberme").Value))) = CStr("1")) Then Response.Write("checked") : Response.Write("")%> type="checkbox" name="kt_login_rememberme" id="kt_login_rememberme" value="1" /></td>
      </tr>
      <tr class="KT_buttons">
        <td colspan="3"><input name="kt_login1" type="submit" class="loginButton" id="kt_login1" value="Login" /></td>
      </tr>
    </table>
  </form>
  <p>&nbsp;</p>
</div>
<div id="index_r6_c9">
  <div class="panelheader">Information</div>
</div>
<div id="index_r7_c9">
</div>
<div id="index_r7_c10">
  <div id="Accordion1" class="Accordion" tabindex="0">
    <div class="AccordionPanel">
      <div class="AccordionPanelTab">Metoject</div>
      <div class="AccordionPanelContent">
        <table width="145" border="0">
          <tr>
            <td width="35"><img src="images/metoject.gif" width="35" height="26" /></td>
            <td width="100">We show you where the product is made</td>
          </tr>
          <tr>
            <td colspan="2" class="panel"><a href="metoject.asp">&gt;further information</a><br /></td>
          </tr>
        </table>
        <p class="panel">&nbsp;</p>
      </div>
    </div>
    <div class="AccordionPanel">
      <div class="AccordionPanelTab">SST</div>
      <div class="AccordionPanelContent">
        <table width="145" border="0">
          <tr>
            <td width="35"><img src="images/SST.gif" width="35" height="25" /></td>
            <td width="100">Saliva Stimulating Tablets.</td>
          </tr>
          <tr>
            <td colspan="2" class="panel">More information on this product to follow<br />
              <a href="sst.asp" class="panel">&gt;further information</a><br /></td>
          </tr>
        </table>
      </div>
    </div>
</div>
</div>
<div id="index_r7_c12">
</div>
<div id="index_r10_c10">
</div>
<div id="index_r10_c11">
</div>
<div id="index_r12_c10">
<div id="RHS_menu1">
<span class="bodytext_bold">Metoject</span><span class="bodytext"><br />
New product is featured in this months news. Read the reviews and share your comments. </span> </div>
 
</div>
<div class="leftbar" id="index_r13_c1">
  <table width="96%" border="0" class="leftbar_table">
  <tr></tr>
  <tr>
    <td>Scion House,<br>
Innovation Park,<br>
Stirling University,<br>
Stirling<br>
FK9 4NF<br>
T: 01786 458086<br>
F: 01786 458032<br>
E:<a href="mailto:info@medacuk.com"> info@medacuk.com</a></td>
  </tr>
  </table>
  <table width="50" border="0">
  </table>
</div>
<script type="text/javascript">
<!--
var Accordion1 = new Spry.Widget.Accordion("Accordion1");
//-->
</script>
</body>
</html>
 
 
 
 
 
 
 
 
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/connMedac.asp" -->
<!--#include file="includes/common/KT_common.asp" -->
<!--#include file="includes/tNG/tNG.inc.asp" -->
<!--#include file="includes/tNG/tNG_config.inc.asp" -->
 
<%session("MM_UserEmail")=Request.Form("txtUserEmail")%>
<%session("MM_UserPassword")=Request.Form("txtUserPassword")%>
<%session("kt_login_id") = "UsrID"%>
<%session("kt_login_user") = "txtUserEmail"%>
<%session("kt_txtUserFirstName") = "txtUserFirstName"%>
<%session("kt_txtUserEmail") = "txtUserEmail"%>
<%session("kt_login_level") = "intAccessLevel"%>
<%session("kt_txtUserPassword") = "txtUserPassword"%>
 
<%
'Make a transaction dispatcher instance
Dim tNGs: Set tNGs = new tNG_dispatcher
tNGs.Init ""
%>
<%
'start Trigger_CheckPasswords trigger
'remove this line if you want to edit the code by hand
Function Trigger_CheckPasswords (ByRef tNG)
  Dim myThrowError: Set myThrowError = new tNG_ThrowError
  myThrowError.Init tNG
  myThrowError.setErrorMsg "Passwords do not match."
  myThrowError.setField "txtUserPassword"
  myThrowError.setFieldErrorMsg "The two passwords do not match."
  Set Trigger_CheckPasswords = myThrowError.Execute()	
End Function
'end Trigger_CheckPasswords trigger
%>
<%
'start Trigger_WelcomeEmail trigger
'remove this line if you want to edit the code by hand
Function Trigger_WelcomeEmail (ByRef tNG)
  Dim emailObj: Set emailObj = new tNG_Email
  emailObj.Init tNG
  emailObj.setFrom "{KT_defaultSender}"
  emailObj.setTo "{txtUserEmail}"
  emailObj.setCC ""
  emailObj.setBCC ""
  emailObj.setSubject "Welcome"
  'FromFile method
  emailObj.setContentFile "includes/mailtemplates/welcome.html"
  emailObj.setEncoding "ISO-8859-1"
  emailObj.setFormat "HTML/Text"
  emailObj.setImportance "Normal"
  Set Trigger_WelcomeEmail = emailObj.Execute()
End Function
'end Trigger_WelcomeEmail trigger
%>
<%
'start Trigger_Custom trigger
Function Trigger_Custom (ByRef tNG)
Session("kt_login_id") = tNG.getPrimaryKeyValue()
Session("kt_login_user") = tNG.getColumnValue("txtUserEmail")
Session("kt_login_level") =  tNG.getColumnValue("intAccessLevel")
SET Trigger_Custom  = Nothing
 
End Function
'end Trigger_Custom trigger
%>
<%
Dim rsUsers
Dim rsUsers_cmd
Dim rsUsers_numRows
 
Set rsUsers_cmd = Server.CreateObject ("ADODB.Command")
rsUsers_cmd.ActiveConnection = MM_connMedac_STRING
rsUsers_cmd.CommandText = "SELECT * FROM tblRegistration" 
rsUsers_cmd.Prepared = true
 
Set rsUsers = rsUsers_cmd.Execute
rsUsers_numRows = 0
%>
<%
Dim rsAccessLevel
Dim rsAccessLevel_cmd
Dim rsAccessLevel_numRows
 
Set rsAccessLevel_cmd = Server.CreateObject ("ADODB.Command")
rsAccessLevel_cmd.ActiveConnection = MM_connMedac_STRING
rsAccessLevel_cmd.CommandText = "SELECT intLevelID, txtLevel FROM tblAccessLevels" 
rsAccessLevel_cmd.Prepared = true
 
Set rsAccessLevel = rsAccessLevel_cmd.Execute
rsAccessLevel_numRows = 0
%>
<%
' Make an insert transaction instance 
Dim userRegistration: Set userRegistration = new tNG_insert
userRegistration.init MM_connMedac_STRING
tNGs.addTransaction userRegistration
' Register triggers
userRegistration.registerTrigger Array("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1")
userRegistration.registerTrigger Array("END", "Trigger_Default_Redirect", 99, "admin.asp")
userRegistration.registerConditionalTrigger "{POST.txtUserPassword} <> {POST.re_txtUserPassword}", Array("BEFORE", "Trigger_CheckPasswords", 50)
userRegistration.registerTrigger Array("AFTER", "Trigger_WelcomeEmail", 40)
' Add columns
userRegistration.setTable "tblRegistration"
userRegistration.addColumn "txtUserTitle", "STRING_TYPE", "POST", "txtUserTitle", ""
userRegistration.addColumn "txtUserFirstName", "STRING_TYPE", "POST", "txtUserFirstName", ""
userRegistration.addColumn "txtUserSurname", "STRING_TYPE", "POST", "txtUserSurname", ""
userRegistration.addColumn "txtUserPosition", "STRING_TYPE", "POST", "txtUserPosition", ""
userRegistration.addColumn "txtUserPostcode", "STRING_TYPE", "POST", "txtUserPostcode", ""
userRegistration.addColumn "txtUserEmail", "STRING_TYPE", "POST", "txtUserEmail", ""
userRegistration.addColumn "txtUserGroup", "STRING_TYPE", "POST", "txtUserGroup", ""
userRegistration.addColumn "txtUserPassword", "STRING_TYPE", "POST", "txtUserPassword", ""
userRegistration.setPrimaryKey "UsrID", "NUMERIC_TYPE", "", ""
%>
<%
'Make a login transaction instance
Dim loginTransaction: Set loginTransaction = new tNG_login
loginTransaction.init MM_connMedac_STRING
tNGs.addTransaction loginTransaction
'Register triggers
loginTransaction.registerTrigger Array("STARTER", "Trigger_Default_Starter", 1, "POST", "kt_login1")
loginTransaction.registerTrigger Array("END", "Trigger_Default_Redirect", 99, "{kt_login_redirect}")
loginTransaction.registerTrigger Array("AFTER", "Trigger_Custom", 50)
' Add columns
loginTransaction.addColumn "kt_login_user", "STRING_TYPE", "POST", "txtUserEmail", ""
loginTransaction.addColumn "kt_login_password", "STRING_TYPE", "POST", "txtUserPassword", ""
loginTransaction.addColumn "kt_login_level", "STRING_TYPE", "POST", "intAccessLevel", ""
'End of login transaction instance
%>
 
<%
'Execute all the registered transactions
tNGs.executeTransactions
%>
<%
'Get the transaction recordset
Dim rstblRegistration
Dim rstblRegistration_numRows
 
Set rstblRegistration = tNGs.getRecordset("tblRegistration")
rstblRegistration_numRows = 0
%>
<%
'Get the transaction recordset
Dim rscustom
Dim rscustom_numRows
 
Set rscustom = tNGs.getRecordset("custom")
rscustom_numRows = 0
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Medac - Register</title>
<!--[if IE]>
<style type="text/css" media="all">.borderitem {border-style:solid;}</style>
<![endif]-->
<style type="text/css">
<!--
a {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
}
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}
a:active {
	text-decoration: none;
}
-->
</style>
<script src="SpryAssets/SpryAccordion.js" type="text/javascript"></script>
<script src="SpryAssets/SpryValidationSelect.js" type="text/javascript"></script>
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
<link href="register.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<link href="includes/skins/mxkollection3.css" rel="stylesheet" type="text/css" media="all" />
<script src="includes/common/js/base.js" type="text/javascript"></script>
<script src="includes/common/js/utility.js" type="text/javascript"></script>
<script src="includes/skins/style.js" type="text/javascript"></script>
<script src="SpryAssets/SpryValidationCheckbox.js" type="text/javascript"></script>
<script src="SpryAssets/SpryValidationConfirm.js" type="text/javascript"></script>
<link href="SpryAssets/SpryValidationCheckbox.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryValidationConfirm.css" rel="stylesheet" type="text/css" />
</head>
 
<body class="AccordionPanelOpen">
<div id="Div2">
</div>
<div id="Div3">
</div>
<div id="index_r1_c1">
  <div id="search">
<form action="results.asp" method="get" target="_self" id="frmSearch">
  <label>
    <input name="search" type="text" class="searchField" id="search2" />
  </label>
  <label>
    <input type="submit" class="searchButton" value="Search"/>
  </label>
</form>
</div>
</div>
<div id="index_r1_c9">
</div>
<div id="index_r2_c1">
<span id="navbar"><a href="index.asp">Home</a> | <a href="about.asp">About us</a> | <a href="products.asp">Products</a> | <a href="contact.asp">Contact</a> | <a href="metoject.asp"> Metoject</a>
<%
' Show If User is Logged In (region1_adminlink)
  Set isLoggedIn = new tNG_UserLoggedIn
  isLoggedIn.Init MM_connMedac_STRING
' Grand Levels: Level
  isLoggedIn.addLevel "1"
  If isLoggedIn.Execute() Then
%> 
  | <a href="admin.asp"> Admin</a>
  <%
  End If
' End Show If User Is Logged In (region1_adminlink)
%>
</span></div>
<div id="index_r3_c1">
</div>
<div id="index_r4_c9" class="signout">
  <table width="95%" height="27" border="0">
    <tr>
      <td><%
' Show If User is Logged In (region2_signoutlink)
  Set isLoggedIn1 = new tNG_UserLoggedIn
  isLoggedIn1.Init MM_connMedac_STRING
' Grand Levels: Level
  isLoggedIn1.addLevel "1"
  If isLoggedIn1.Execute() Then
%>
          <a href="logout.asp" class="bodytext">Signout</a>
      <%
  End If
' End Show If User Is Logged In (region2_signoutlink)
%></td>
    </tr>
  </table>
  <a href="logout.asp" class="bodytext"></a>
 
</div>
<div id="index_r5_c1">
</div>
<div id="index_r5_c2">
  <form method="post" id="form1" action="<%=cStr(Request.Form("KT_Insert1"))%>">
    <table width="98%" border="0" cellspacing="3" class="bodytext">
      <tr>
        <td height="31" colspan="4" class="bodytext_h1">Register</td>
      </tr>
      <tr>
        <td colspan="4"><p><span class="requiredfields">FOR HEALTHCARE PROFESSIONALS ONLY</span><br />
          To recieve further information and access to SPC downloads, simply complete the short form below.</p></td>
      </tr>
      <tr>
        <td height="32" colspan="4" valign="middle">Are you a healthcare professional? <span id="spryyes">
          <label>
            <input type="checkbox" name="yes" id="yes" />
          </label>
        <span class="checkboxRequiredMsg">Please make a selection.</span></span>yes</td>
      </tr>
      <tr>
        <td height="24" colspan="4" class="requiredfields">(* = required fields)</td>
      </tr>
      <tr>
        <td width="18%" height="24" align="right"><span class="requiredfields">*</span>Title:</td>
        <td colspan="3"><span id="spry_title">
          <label>
            <select name="txtUserTitle" class="registerButton" id="txtUserTitle" value="<%=(KT_escapeAttribute(rstblRegistration.Fields.Item("txtUserTitle").Value))%>" >
              <option value="Dr" selected="selected">Dr</option>
<option value="Mr">Mr</option>
<option value="Mrs">Mrs</option>
            </select>
          </label>
        <span class="selectRequiredMsg">Please select an item.</span></span></td>
      </tr>
      <tr>
        <td align="right"><span class="requiredfields">*</span>First Name:</td>
        <td width="37%"><span id="spry_first_name">
          <label>
            <input name="txtUserFirstName" type="text" class="registerButton" id="txtUserFirstName" value="<%=(KT_escapeAttribute(rstblRegistration.Fields.Item("txtUserFirstName").Value))%>" size="30" />
            <br />
          </label>
        <span class="textfieldRequiredMsg">        A value is required.</span></span></td>
        <td width="16%" align="right"><span class="requiredfields">*</span>Surname:</td>
        <td width="29%"><span id="spry_surname">
          <label>
            <input name="txtUserSurname" type="text" class="registerButton" id="txtUserSurname" value="<%=(KT_escapeAttribute(rstblRegistration.Fields.Item("txtUserSurname").Value))%>" />
            <br />
          </label>
        <span class="textfieldRequiredMsg">A value is required.</span></span></td>
      </tr>
      <tr>
        <td align="right"><span class="requiredfields">*</span>Email Address:</td>
        <td><span id="spry_email">
        <label>
          <input name="txtUserEmail" type="text" class="registerButton" id="txtUserEmail" value="<%=(KT_escapeAttribute(rstblRegistration.Fields.Item("txtUserEmail").Value))%>" />
          <br />
        </label>
        <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
        <td align="right"><span class="requiredfields">*</span>Confirm Email:</td>
        <td><span id="spry_confirm_email">
          <label>
            <input name="register_Confirmemail" type="text" class="registerButton" id="register_Confirmemail" />
          </label>
        <span class="confirmRequiredMsg"><br />
        A value is required.</span><span class="confirmInvalidMsg">The values don't match.</span></span></td>
      </tr>
      <tr>
        <td align="right"><span class="requiredfields">*</span>Professional Group:</td>
        <td><span id="txtUserGroup">
          <label>
            <select name="txtUserGroup" class="registerButton" id="txtUserGroup">
              <option value="Antibiotic Pharmacist" selected="selected">Antibiotic Pharmacist</option>
              <option value="Bachelor of Science in Nursing">Bachelor of Science in Nursing</option>
              <option value="Certified Nurse-Midwife">Certified Nurse-Midwife</option>
              <option value="Clinical Specialist">Clinical Specialist</option>
              <option value="Community Matron">Community Matron</option>
              <option value="District Nurse">District Nurse</option>
              <option value="Medical Assistant">Medical Assistant</option>
              <option value="Medical Doctor">Medical Doctor</option>
              <option value="Medical Technician">Medical Technician</option>
              <option value="Nurse Practitioner">Nurse Practitioner</option>
              <option value="Office Manager">Office Manager</option>
              <option value="Office Staff">Office Staff</option>
              <option value="Osteopath">Osteopath</option>
              <option value="Pharmacist">Pharmacist</option>
              <option value="Pharmacist - Hospital">Pharmacist - Hospital</option>
              <option value="Pharmacist - Retail">Pharmacist - Retail</option>
              <option value="Philosophy Doctor (phD)">Philosophy Doctor (phD)</option>
              <option value="Physician Assistant">Physician Assistant</option>
              <option value="Podiatrist">Podiatrist</option>
              <option value="Practice Nurse">Practice Nurse</option>
              <option value="Registered Nurse">Registered Nurse</option>
              <option value="Student">Student</option>
            </select>
          </label>
        <span class="selectRequiredMsg">Please select an item.</span></span></td>
        <td align="right"><span class="requiredfields">*</span>Position:</td>
        <td><span id="spry_position">
          <label>
            <select name="txtUserPosition" class="registerButton" id="txtUserPosition">
              <option value="Allergy" selected="selected">Allergy</option>
              <option value="Anesthesiology">Anesthesiology</option>
              <option value="Cardiology">Cardiology</option>
              <option value="Colorectal Surgery">Colorectal Surgery</option>
              <option value="Dermatology">Dermatology</option>
              <option value="Emergency Medicine">Emergency Medicine</option>
              <option value="Endocrinology">Endocrinology</option>
              <option value="Epidemiology">Epidemiology</option>
              <option value="Family Practice">Family Practice</option>
              <option value="Gastroenterology">Gastroenterology</option>
              <option value="General Practice">General Practice</option>
              <option value="General Surgery">General Surgery</option>
              <option value="Geriatric Medicine">Geriatric Medicine</option>
              <option value="Gynaecology">Gynaecology</option>
              <option value="Haemotology">Haemotology</option>
              <option value="Immunology">Immunology</option>
              <option value="Infectious Disease">Infectious Disease</option>
              <option value="Intensive Care">Intensive Care</option>
              <option value="Microbiology">Microbiology</option>
              <option value="Nephrology">Nephrology</option>
              <option value="Neurology">Neurology</option>
              <option value="Obstetrics &amp; Gynecology">Obstetrics &amp; Gynecology</option>
              <option value="Occupational Medicine">Occupational Medicine </option>
              <option value="Oncology">Oncology</option>
              <option value="Ophthalmology">Ophthalmology</option>
              <option value="Orthopedic Surgery">Orthopedic Surgery</option>
              <option value="Other">Other</option>
              <option value="Otolaryngology">Otolaryngology</option>
              <option value="Paediatrics">Paediatrics</option>
              <option value="Pain Management">Pain Management</option>
              <option value="Palliative Care">Palliative Care</option>
              <option value="Plastic Surgery">Plastic Surgery</option>
              <option value="Psychiatry">Psychiatry</option>
              <option value="Public Health">Public Health</option>
              <option value="Radiology">Radiology</option>
              <option value="Rehabilitation Medicine">Rehabilitation Medicine</option>
              <option value="Reproductive Endocrinologist">Reproductive Endocrinologist</option>
              <option value="Respiratory Medicine">Respiratory Medicine</option>
              <option value="Rheumatology">Rheumatology</option>
              <option value="Transplantation">Transplantation</option>
              <option value="Uro-gyneacologist">Uro-gyneacologist</option>
              <option value="Urology">Urology</option>
              <option value="Vaccines">Vaccines</option>
              <option value="Vascular Surgery">Vascular Surgery</option>
            </select>
          </label>
        <span class="selectRequiredMsg">Please select an item.</span></span></td>
      </tr>
      <tr>
        <td align="right"><span class="requiredfields">*</span>Password:</td>
        <td><span id="spry_password">
          <label>
            <input name="txtUserPassword" type="password" class="registerButton" id="txtUserPassword" value="<%=(KT_escapeAttribute(rstblRegistration.Fields.Item("txtUserPassword").Value))%>" />
            <br />
          </label>
        <span class="textfieldRequiredMsg">A value is required.</span></span></td>
        <td align="right"><span class="requiredfields">*</span>Confirm Password:</td>
        <td><span id="spry_confirm_password">
          <label>
            <input name="re_txtUserPassword" type="password" class="registerButton" id="re_txtUserPassword" />
            <br />
          </label>
        <span class="confirmRequiredMsg">A value is required.</span><span class="confirmInvalidMsg">The values don't match.</span></span></td>
      </tr>
      <tr>
        <td align="right"><span class="requiredfields">*</span>Work Postcode:</td>
        <td colspan="3"><span id="spry_Postcode">
          <label>
            <input name="txtUserPostcode" type="text" class="registerButton" id="txtUserPostcode" value="<%=(KT_escapeAttribute(rstblRegistration.Fields.Item("txtUserPostcode").Value))%>" />
            <br />
          </label>
        <span class="textfieldRequiredMsg">A value is required.</span></span></td>
      </tr>
      <tr>
        <td align="right">&nbsp;</td>
        <td colspan="3"><input name="KT_Insert1" type="submit" class="registerButton" id="KT_Insert1" value="Submit" /></td>
      </tr>
    </table>
  </form>
</div>
<div id="index_r6_c9">
  <div class="panelheader">Information</div>
</div>
<div id="index_r7_c9">
</div>
<div id="index_r7_c10">
  <div id="Accordion1" class="Accordion" tabindex="0">
    <div class="AccordionPanel">
      <div class="AccordionPanelTab">SST</div>
      <div class="AccordionPanelContent">
        <table width="145" border="0">
          <tr>
            <td width="35"><img src="images/SST.gif" width="35" height="25" /></td>
            <td width="100">Saliva Stimulating Tablets.</td>
          </tr>
          <tr>
            <td colspan="2" class="panel">More information on this product to follow<br />
            <a href="saliva.asp" class="panel">&gt;further information</a><br /></td>
          </tr>
        </table>
      </div>
    </div>
<div class="AccordionPanel">
      <div class="AccordionPanelTab">Metoject</div>
<div class="AccordionPanelContent">
        <table width="145" border="0">
          <tr>
            <td width="35"><img src="images/metoject.gif" width="35" height="26" /></td>
            <td width="100">We show you where the product is made</td>
          </tr>
          <tr>
            <td colspan="2" class="panel"><a href="metoject.asp">&gt;further information</a><br /></td>
          </tr>
        </table>
        <p class="panel">&nbsp;</p>
      </div>
    </div>
  </div>
</div>
<div id="index_r7_c12">
</div>
<div id="index_r10_c10">
</div>
<div id="index_r10_c11">
</div>
<div id="index_r12_c10">
<div id="RHS_menu1">
<span class="bodytext_bold">Metoject</span><span class="bodytext"><br />
New product is featured in this months news. Read the reviews and share your comments. </span> </div>
</div>
<div class="leftbar" id="index_r13_c1">
  <table width="96%" border="0" class="leftbar_table">
  <tr></tr>
  <tr>
    <td>Scion House,<br>
Innovation Park,<br>
Stirling University,<br>
Stirling<br>
FK9 4NF<br>
T: 01786 458086<br>
F: 01786 458032<br>
E:<a href="mailto:info@medacuk.com"> info@medacuk.com</a></td>
  </tr>
  </table>
  <table width="50" border="0">
  </table>
</div>
<%
	Response.Write tNGs.getErrorMsg()
%>
<script type="text/javascript">
<!--
var Accordion1 = new Spry.Widget.Accordion("Accordion1");
var spryselect1 = new Spry.Widget.ValidationSelect("spry_title");
var sprytextfield1 = new Spry.Widget.ValidationTextField("spry_first_name");
var sprycheckbox1 = new Spry.Widget.ValidationCheckbox("spryyes");
var spryselect2 = new Spry.Widget.ValidationSelect("txtUserGroup");
var sprytextfield2 = new Spry.Widget.ValidationTextField("spry_surname");
var sprytextfield3 = new Spry.Widget.ValidationTextField("spry_email", "email");
var spryconfirm1 = new Spry.Widget.ValidationConfirm("spry_confirm_email", "txtUserEmail");
var spryselect3 = new Spry.Widget.ValidationSelect("spry_position");
var sprytextfield4 = new Spry.Widget.ValidationTextField("spry_password", "none");
var spryconfirm2 = new Spry.Widget.ValidationConfirm("spry_confirm_password", "txtUserPassword");
var sprytextfield5 = new Spry.Widget.ValidationTextField("spry_Postcode");
//-->
</script>
</body>
</html>
<%
rsUsers.Close()
Set rsUsers = Nothing
%>
<%
rsAccessLevel.Close()
Set rsAccessLevel = Nothing
%>
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
461:
462:
463:
464:
465:
466:
467:
468:
469:
470:
471:
472:
473:
474:
475:
476:
477:
478:
479:
480:
481:
482:
483:
484:
485:
486:
487:
488:
489:
490:
491:
492:
493:
494:
495:
496:
497:
498:
499:
500:
501:
502:
503:
504:
505:
506:
507:
508:
509:
510:
511:
512:
513:
514:
515:
516:
517:
518:
519:
520:
521:
522:
523:
524:
525:
526:
527:
528:
529:
530:
531:
532:
533:
534:
535:
536:
537:
538:
539:
540:
541:
542:
543:
544:
545:
546:
547:
548:
549:
550:
551:
552:
553:
554:
555:
556:
557:
558:
559:
560:
561:
562:
563:
564:
565:
566:
567:
568:
569:
570:
571:
572:
573:
574:
575:
576:
577:
578:
579:
580:
581:
582:
583:
584:
585:
586:
587:
588:
589:
590:
591:
592:
593:
594:
595:
596:
597:
598:
599:
600:
601:
602:
603:
604:
605:
606:
607:
608:
609:
610:
611:
612:
613:
614:
615:
616:
617:
618:
619:
620:
621:
622:
623:
624:
625:
626:
627:
628:
629:
630:
631:
632:
633:
634:
635:
636:
637:
638:
639:
640:
641:
642:
643:
644:
645:
646:
647:
648:
649:
650:
651:
652:
653:
654:
655:
656:
657:
658:
659:
660:
661:
662:
663:
664:
665:
666:
667:
668:
669:
670:
671:
672:
673:
674:
675:
676:
677:
678:
679:
680:
681:
682:
683:
684:
685:
686:
687:
688:
689:
690:
691:
692:
693:
694:
695:
696:
697:
698:
699:
700:
701:
702:
703:
704:
705:
706:
707:
708:
709:
710:
711:
712:
713:
714:
715:
716:
717:
718:
719:
720:
721:
722:
723:
724:
725:
726:
727:
728:
729:
730:
731:
732:
733:
734:
735:
736:
737:
738:
739:
740:
741:
742:
743:
744:
745:

Select allOpen in new window

 

by: Andy6350Posted on 2009-09-27 at 11:46:50ID: 25434984

Hi,

Is this enough information you need?

 

by: RouchiePosted on 2009-09-28 at 01:15:30ID: 25437464

Hi

I have stared at this code for half an hour now and to be honest it is so hideously over-complicated that I would start again and use DW's code wizards instead.  I'm sorry that's not the answer you were looking for, but I don't want to waste your time by having to pull all this apart.

If you can re-create the registration form and login form, then I can help you apply the ASP so that the user gets automatically logged in when they register.  The code using DW will actually be a lot less than what you have now.  Toolbox is adding a layer of abstraction that seems completely unneccessary.

 

by: Andy6350Posted on 2009-09-28 at 05:38:21ID: 31632643

I was unable to solve my issue as it was recommended i used a different way of creating my admin area. As I came on here to get a solution so i didnt have to recreate what i had already done, this didnt really help.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...