Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with Application Var

Status
Not open for further replies.

webstaff

Technical User
Jan 2, 2003
97
GB
Hey Guys,

I have a log in page and from that I take the username and stuff it into Session("username")

When I want to say at the top of a page hello username I can use this session var Session("username") to get the name for me, this works fine in the root of the web pages, but when I call a page inside another directory in the root the scripts do not work, the page shows but with a gap where the name should be.

Can anyone suggest whats up?

Regards as ever
W

 
I may be wrong, but perhaps by going to another directory you are essentially trying to leave the current domain? If so, I believe that you cannot carry a session variable to another domain, even if it is in the same root. Have not had the issue myself, but would be interested in additional feedback if that is not true.

------------------------------------------------------------------------------------------------------------------------
If you don't have a sense of humor, you probably don't have any sense at all.
- Anonymous
 
Is it a page within the same virtual directory?

Is there any code at the start of the page that would reset the Session variable?

eg)
Session.Abandon

or

Session("Username") = something here

Tony
_______________________________________________________________
 
Hi Guys,

Thanks for the replys.

Im running IIS on WIN XP Pro,
So my site is in the within the sites root I can use my session /application var's, as on the main log in page I set the session var "Session("username")= Request.Form("username")"

Now I can use this in the pages in sites root dir,, but as I say within the sites root I have 2 more folders and when I try to use my session var on the pages within these folders I get nothing where the vars should be.

So my var is only active in the sites root for some reason.

Thanks again Guys
W
 
Here is the code for one of the pages where the vars do not work.

There is also a hidden field set to the value of one of the session vars that is not working.


<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

<!--#include file="../Connections/open.asp" -->
<%
' *** Edit Operations: declare variables

Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd

Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId

Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i

MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Request.QueryString
End If

' boolean to abort record edit
MM_abortEdit = false

' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables

If (CStr(Request("MM_insert")) = "form1") Then

MM_editConnection = MM_open_STRING
MM_editTable = "shows1"
MM_editRedirectUrl = "menu.asp"
MM_fieldsStr = "sociaty|value|selectBOB|value|venue|value|select2BD|value|judge|value|select3BB|value|selectclass|value|selectRBOB|value|showdate|value|selectBP|value|entered|value|RESBP|value|absent|value|BIS|value|jw|value|RBIS|value|textfieldSCom|value|BPIS|value|select2sex|value|RBPIS|value|kcname|value|ownersfname|value|select7G1|value|ownerssname|value|select8G2|value|affix|value|select9G3|value|winner|value|select10G4|value|selecttype|value|select11st|value|select12nd|value|select13rd|value|select14th|value|select15th|value|HFmember|value"
MM_columnsStr = "sociaty|',none,'|BOB|none,none,NULL|venue|',none,'|BD|none,none,NULL|judge|',none,'|BB|none,none,NULL|class|',none,'|RBOB|none,none,NULL|showdate|',none,NULL|BPUP|none,none,NULL|entered|none,none,NULL|RBPUP|none,none,NULL|absent|none,none,NULL|BIS|none,none,NULL|jw|none,none,NULL|RBIS|none,none,NULL|SCom|none,none,NULL|BPIS|none,none,NULL|Sex|',none,'|RBPIS|none,none,NULL|kcname|',none,'|ownersfname|',none,'|G1|none,none,NULL|ownerssname|',none,'|G2|none,none,NULL|affix|',none,'|G3|none,none,NULL|winner|',none,'|G4|none,none,NULL|type|',none,'|1st|none,none,NULL|2nd|none,none,NULL|3rd|none,none,NULL|4th|none,none,NULL|5th|none,none,NULL|member|',none,'"

' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")

' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
Next

' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If

End If
%>
<%
' *** Insert Record: construct a sql insert statement and execute it

Dim MM_tableValues
Dim MM_dbValues

If (CStr(Request("MM_insert")) <> "") Then

' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1),",")
MM_delim = MM_typeArray(0)
If (MM_delim = "none") Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none") Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none") Then MM_emptyVal = ""
If (MM_formVal = "") Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "") Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'") Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","'") & "'"
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) Then
MM_tableValues = MM_tableValues & ","
MM_dbValues = MM_dbValues & ","
End If
MM_tableValues = MM_tableValues & MM_columns(MM_i)
MM_dbValues = MM_dbValues & MM_formVal
Next
MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"

If (Not MM_abortEdit) Then
' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close

If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editRedirectUrl)
End If
End If

End If
%>

<html>
<head>
<title>Add Your Record</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
var i,p,q,nm,test,num,min,max,errors=',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == ');
}
//-->
</script>
</head>

<body>
<div align="center">
<p><font color="#0000FF" size="4" face="Arial, Helvetica, sans-serif"><strong>Open
&amp; Limit Show Entry's</strong></font></p>
<p><font face="Arial, Helvetica, sans-serif"><strong>Be sure to fill in all
the fields in full.</strong></font></p>
<p><font color="#FF0000" face="Verdana, Arial, Helvetica, sans-serif"><strong>Hey
<%Response.write(Session("usercookie2"))%>
Please Note!</strong></font></p>
<p><strong><font color="#FF0000" face="Verdana, Arial, Helvetica, sans-serif">The KC Name must be Identical in each of your dogs records or the database
will see them as different dogs.</font></strong></p>
<form action="<%=MM_editAction%>" method="POST" name="form1" onSubmit="MM_validateForm('sociaty',','R','venue',','R','judge',','R','showdate',','R','kcname',','R','ownersfname',','R','ownerssname',','R');return document.MM_returnValue">
<table width="82%" height="508" border="1" bgcolor="#000000">
<tr>
<td height="502" bgcolor="#CCCCCC"> <div align="center">
<table width="806" align="center">
<tr valign="baseline" bgcolor="#000000">
<td colspan="2" align="right" nowrap> <div align="center"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"><strong>Main
details </strong></font></div></td>
<td colspan="2"> <div align="center"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">
<strong>Achievements Gained At Event</strong></font></div></td>
</tr>
<tr valign="baseline">
<td width="206" align="right" nowrap><font size="-2" face="Arial, Helvetica, sans-serif">Accociated
Society:</font></td>
<td width="198"><font size="-1" face="Arial, Helvetica, sans-serif">
<input type="text" name="sociaty" value="" size="32">
</font></td>
<td width="186"> <div align="right"><font color="#0000FF" size="-2" face="Arial, Helvetica, sans-serif">BOB</font><font size="-2" face="Arial, Helvetica, sans-serif">
(25 points)</font></div></td>
<td width="196"> <font size="-2" face="Arial, Helvetica, sans-serif">
<select name="selectBOB" id="selectBOB">
<option value="0" selected>No Achievement
<option value="25">Gained Achievement
</select>
</font></td>
</tr>
<tr valign="baseline">
<td nowrap align="right"><font size="-2" face="Arial, Helvetica, sans-serif">Shows
Venue:</font></td>
<td><font size="-1" face="Arial, Helvetica, sans-serif">
<input type="text" name="venue" value="" size="32">
</font></td>
<td><div align="right"><font color="#0000FF" size="-2" face="Arial, Helvetica, sans-serif">BD</font><font size="-2" face="Arial, Helvetica, sans-serif">
(10 points) </font></div></td>
<td> <font size="-2" face="Arial, Helvetica, sans-serif">
<select name="select2BD" id="select2BD">
<option value="0" selected>No Achievement
<option value="10">Gained Achievement
</select>
</font></td>
</tr>
<tr valign="baseline">
<td nowrap align="right"><font size="-2" face="Arial, Helvetica, sans-serif">Judge's
Full Name:<font color="#FF0000">EG: Mr J.Brown</font>:</font></td>
<td><font size="-1" face="Arial, Helvetica, sans-serif">
<input type="text" name="judge" value="" size="32">
</font></td>
<td><div align="right"><font color="#0000FF" size="-2" face="Arial, Helvetica, sans-serif">BB</font><font size="-2" face="Arial, Helvetica, sans-serif">
(10 points)</font></div></td>
<td> <font size="-2" face="Arial, Helvetica, sans-serif">
<select name="select3BB" id="select3BB">
<option value="0" selected>No Achievement
<option value="10">Gained Achievement
</select>
</font></td>
</tr>
<tr valign="baseline">
<td nowrap align="right"><font size="-2" face="Arial, Helvetica, sans-serif">Class</font></td>
<td><font size="-1" face="Arial, Helvetica, sans-serif">
<select name="selectclass" id="select">
<option value="MPD">Minor Puppy Dog</option>
<option value="MPB">Minor Puppy Bitch</option>
<option value="PD">Puppy Dog</option>
<option value="PB">Puppy Bitch</option>
<option value="JD">Junior Dog</option>
<option value="JB">Junior Bitch</option>
<option value="M">Maiden </option>
<option value="ND">Novice Dog</option>
<option value="NB">Novice Bitch</option>
<option value="UGD">Under Graduate Dog</option>
<option value="UGB">Under Graduate Bitch</option>
<option value="GD">Graduate Dog</option>
<option value="GB">Graduate Bitch</option>
<option value="PGD">Post Graduate Dog</option>
<option value="PGB">Post Graduate Bitch</option>
<option value="MLD">Mid Limit Dog</option>
<option value="MLB">Mid Limit Bitch</option>
<option value="LD">Limit Dog</option>
<option value="LB">Limit Bitch</option>
<option value="VD">Veteran Dog</option>
<option value="VB">Veteran Bitch</option>
<option value="SFRB">Special Fawn/Red Bitch</option>
<option value="SFRD">Special Fawn/Red Dog</option>
<option value="SBBB">Special Black/Brindle Bitch</option>
<option value="SBBD">Special Black/Brindle Dog</option>
<option value="TYRO">TYRO</option>
<option value="DEB">DEBUTANT </option>
<option value="FTD">FIELD TRIAL Dog</option>
<option value="FTB">FIELD TRIAL Bitch</option>
<option value="WTD">WORKING TRIAL Dog</option>
<option value="WTB">WORKING TRIAL Bitch</option>
<option value="STD">STUD DOG </option>
<option value="BROODB">BROOD BITCH</option>
<option value="PRGD">PROGENY Dog</option>
<option value="PRGB">PROGENY Bitch</option>
<option value="BRACd">BRACE Dog</option>
<option value="BRACb">BRACE Bitch</option>
<option value="BRACm">BRACE MIX</option>
<option value="BREEDb">BREEDERS Bitch</option>
<option value="BREEDd">BREEDERS Dog</option>
<option value="NFCb">NOT FOR COMPETITION Bitch</option>
<option value="NFCd">NOT FOR COMPETITION Dog</option>
<option value="OD">Open Dog</option>
<option value="OB">Open Bitch</option>
<option value="SYD">Special Yearling Dog</option>
<option value="SYB">Special Yearling Bitch</option>
<option value="AVs">A.V.Sporting</option>
<option value="AVns">A.V.Non Sporting</option>
</select>
</font></td>
<td><div align="right"><font color="#0000FF" size="-2" face="Arial, Helvetica, sans-serif">Reserve
BOB</font><font size="-2" face="Arial, Helvetica, sans-serif">
(20 points)</font></div></td>
<td> <font size="-2" face="Arial, Helvetica, sans-serif">
<select name="selectRBOB" id="selectRBOB">
<option value="0" selected>No Achievement
<option value="20">Gained Achievement
</select>
</font></td>
</tr>
<tr valign="baseline">
<td nowrap align="right"><font size="-2" face="Arial, Helvetica, sans-serif">Show
date:<font color="#FF0000">EG: 10/04/03 or 10/04/2003</font>:</font></td>
<td><font size="-1" face="Arial, Helvetica, sans-serif">
<input type="text" name="showdate" value="" size="32">
</font></td>
<td><div align="right"><font size="-2" face="Arial, Helvetica, sans-serif">
</font><font color="#0000FF" size="-2" face="Arial, Helvetica, sans-serif">Best
Pup </font><font size="-2" face="Arial, Helvetica, sans-serif">1(5
points)</font></div></td>
<td> <font size="-2" face="Arial, Helvetica, sans-serif">
<select name="selectBP" id="selectBP">
<option value="0" selected>No Achievement
<option value="15">Gained Achievement
</select>
</font></td>
</tr>
<tr valign="baseline">
<td nowrap align="right"><font size="-2" face="Arial, Helvetica, sans-serif">No's
Of Dogs Entered<font color="#FF0000"> <font color="#000000">In
The Class </font>EG:1,2,12</font>:</font></td>
<td><font size="-1" face="Arial, Helvetica, sans-serif">
<input type="text" name="entered" value="" size="32">
</font></td>
<td><div align="right"><font color="#0000FF" size="-2" face="Arial, Helvetica, sans-serif">Reserve
Best Pup </font><font size="-2" face="Arial, Helvetica, sans-serif">(10
points)</font></div></td>
<td><font size="-2" face="Arial, Helvetica, sans-serif">
<select name="RESBP" id="select2">
<option value="0" selected>No Achievement
<option value="10">Gained Achievement
</select>
</font></td>
</tr>
<tr valign="baseline">
<td nowrap align="right"><font size="-2" face="Arial, Helvetica, sans-serif">No's
Of Dogs Absent from The Class <font color="#FF0000">EG:1,2,12</font>:</font></td>
<td><font size="-1" face="Arial, Helvetica, sans-serif">
<input type="text" name="absent" value="" size="32">
</font></td>
<td><div align="right"><font color="#0000FF" size="-2" face="Arial, Helvetica, sans-serif">BIS
</font><font size="-2" face="Arial, Helvetica, sans-serif">(30points)</font></div></td>
<td><font size="-2" face="Arial, Helvetica, sans-serif">
<select name="BIS" id="select4">
<option value="0" selected>No Achievement
<option value="30">Gained Achievement
</select>
</font></td>
</tr>
<tr valign="baseline">
<td nowrap align="right"><font size="-2" face="Arial, Helvetica, sans-serif">Jw
Points To Date:<font color="#FF0000">EG:1,2,12</font></font></td>
<td><font size="-1" face="Arial, Helvetica, sans-serif">
<input type="text" name="jw" value="" size="32">
</font></td>
<td><div align="right"><font color="#0000FF" size="-2" face="Arial, Helvetica, sans-serif">Reserve
BIS</font><font size="-2" face="Arial, Helvetica, sans-serif">
(25 points)</font></div></td>
<td><font size="-2" face="Arial, Helvetica, sans-serif">
<select name="RBIS" id="RBIS">
<option value="0" selected>No Achievement
<option value="25">Gained Achievement
</select>
</font></td>
</tr>
<tr valign="baseline">
<td nowrap align="right"><font size="-2" face="Arial, Helvetica, sans-serif">Show
Certificate of Merit pionts<font color="#FF0000">SCoM EG:1,12,4</font></font></td>
<td><font size="-1" face="Arial, Helvetica, sans-serif">
<input name="textfieldSCom" type="text" id="textfieldSCom">
</font></td>
<td><div align="right"><font color="#0000FF" size="-2" face="Arial, Helvetica, sans-serif">Best
Pup In Show </font><font size="-2" face="Arial, Helvetica, sans-serif">(25
points)</font></div></td>
<td><font size="-2" face="Arial, Helvetica, sans-serif">
<select name="BPIS" id="select3">
<option value="0" selected>No Achievement
<option value="25">Gained Achievement
</select>
</font></td>
</tr>
<tr valign="baseline">
<td nowrap align="right"><font size="-2" face="Arial, Helvetica, sans-serif">Sex
Of Entered Stafford&nbsp;</font></td>
<td><font size="-1" face="Arial, Helvetica, sans-serif">&nbsp;
<select name="select2sex" id="select7">
<option value="M">Male</option>
<option value="F">Female</option>
</select>
</font></td>
<td><div align="right"><font color="#0000FF" size="-2" face="Arial, Helvetica, sans-serif">Res
Best Pup In Show </font><font size="-2" face="Arial, Helvetica, sans-serif">(20
points)</font></div></td>
<td> <font size="-2" face="Arial, Helvetica, sans-serif">
<select name="RBPIS" id="select6">
<option value="0" selected>No Achievement
<option value="20">Gained Achievement
</select>
</font></td>
</tr>
<tr valign="baseline">
<td nowrap align="right"><font size="-2" face="Arial, Helvetica, sans-serif">Your
Stafford's Kcname</font></td>
<td><font size="-1" face="Arial, Helvetica, sans-serif">
<input type="text" name="kcname" value="" size="32">
</font></td>
<td colspan="2" bgcolor="#000000"><div align="center"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"><strong>Groups</strong></font></div></td>
</tr>
<tr valign="baseline">
<td nowrap align="right"><font size="-2" face="Arial, Helvetica, sans-serif">Owner
First Name:&nbsp;</font></td>
<td><font size="-1" face="Arial, Helvetica, sans-serif">
<input type="text" name="ownersfname" value="" size="32">
</font></td>
<td><div align="right"><font color="#FF0000" size="-2" face="Arial, Helvetica, sans-serif">Group1</font><font size="-2" face="Arial, Helvetica, sans-serif">
(4 points)</font></div></td>
<td> <font size="-2" face="Arial, Helvetica, sans-serif">
<select name="select7G1" id="select7G1">
<option value="0" selected>No Achievement
<option value="4">Gained Achievement
</select>
</font></td>
</tr>
<tr valign="baseline">
<td nowrap align="right"><font size="-2" face="Arial, Helvetica, sans-serif">Owners
Surname, </font></td>
<td><font size="-1" face="Arial, Helvetica, sans-serif">
<input type="text" name="ownerssname" value="" size="32">
</font></td>
<td><div align="right"><font color="#FF0000" size="-2" face="Arial, Helvetica, sans-serif">Group2</font><font size="-2" face="Arial, Helvetica, sans-serif">
(3 points)</font></div></td>
<td> <font size="-2" face="Arial, Helvetica, sans-serif">
<select name="select8G2" id="select8G2">
<option value="0" selected>No Achievement</option>
<option value="3">Gained Achievement</option>
</select>
</font></td>
</tr>
<tr valign="baseline">
<td nowrap align="right"><font size="-2" face="Arial, Helvetica, sans-serif">Your
Or Your Dogs Affix&nbsp;</font></td>
<td><font size="-1" face="Arial, Helvetica, sans-serif">
<input type="text" name="affix" value="" size="32">
</font></td>
<td><div align="right"><font color="#FF0000" size="-2" face="Arial, Helvetica, sans-serif">Group3</font><font size="-2" face="Arial, Helvetica, sans-serif">
(2 points)</font></div></td>
<td> <font size="-2" face="Arial, Helvetica, sans-serif">
<select name="select9G3" id="select9G3">
<option value="0" selected>No Achievement</option>
<option value="2">Gained Achievement</option>
</select>
</font></td>
</tr>
<tr valign="baseline">
<td nowrap align="right"><font size="-2" face="Arial, Helvetica, sans-serif">Winners
KC Name</font></td>
<td><font size="-1" face="Arial, Helvetica, sans-serif">
<input type="text" name="winner" value="" size="32">
</font></td>
<td><div align="right"><font color="#FF0000" size="-2" face="Arial, Helvetica, sans-serif">Group4</font><font size="-2" face="Arial, Helvetica, sans-serif">
(1 points)</font></div></td>
<td><font size="-2" face="Arial, Helvetica, sans-serif">
<select name="select10G4" id="select10G4">
<option value="0" selected>No Achievement</option>
<option value="1">Gained Achievement</option>
</select>
</font></td>
</tr>
<tr valign="baseline">
<td nowrap align="right"><font size="-2" face="Arial, Helvetica, sans-serif">Show
Type::</font></td>
<td><font size="-1" face="Arial, Helvetica, sans-serif">
<select name="selecttype" id="select8">
<option value="Open">Open Show</option>
<option value="Limit">Limit Show</option>
</select>
</font></td>
<td colspan="2" bgcolor="#000000"> <div align="right"></div>
<div align="center"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"><strong>Position/
Placement Attained At Event</strong></font></div></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">&nbsp;</td>
<td><font size="-1" face="Arial, Helvetica, sans-serif">&nbsp;
</font></td>
<td><div align="right"><font size="-2" face="Arial, Helvetica, sans-serif"><font color="#009900">1st
</font>(10 points)</font></div></td>
<td> <font size="-2" face="Arial, Helvetica, sans-serif">
<select name="select11st" id="select11st">
<option value="0" selected>No Achievement</option>
<option value="10">Gained Achievement</option>
</select>
</font></td>
</tr>
<tr valign="baseline">
<td colspan="2" rowspan="3" align="right" nowrap><div align="left">
<p align="center"><font size="-1" face="Arial, Helvetica, sans-serif">
<input name="submit" type="submit" value="Insert Record">
</font></p>
<p align="center"><font size="-1" face="Arial, Helvetica, sans-serif">Click
Once Only </font></p>
</div></td>
<td><div align="right"><font size="-2" face="Arial, Helvetica, sans-serif"><font color="#009900">2nd</font>
(8 points)</font></div></td>
<td> <font size="-2" face="Arial, Helvetica, sans-serif">
<select name="select12nd" id="select12nd">
<option value="0" selected>No Achievement</option>
<option value="8">Gained Achievement</option>
</select>
</font></td>
</tr>
<tr valign="baseline">
<td><div align="right"><font size="-2" face="Arial, Helvetica, sans-serif"><font color="#009900">3rd</font>
(6 points)</font></div></td>
<td> <font size="-2" face="Arial, Helvetica, sans-serif">
<select name="select13rd" id="select13rd">
<option value="0" selected>No Achievement</option>
<option value="6">Gained Achievement</option>
</select>
</font></td>
</tr>
<tr valign="baseline">
<td><div align="right"><font size="-2" face="Arial, Helvetica, sans-serif"><font color="#009900">4th</font>
(4 points)</font></div></td>
<td> <font size="-2" face="Arial, Helvetica, sans-serif">
<select name="select14th" id="select14th">
<option value="0" selected>No Achievement</option>
<option value="4">Gained Achievement</option>
</select>
</font></td>
</tr>
<tr valign="baseline">
<td colspan="2" align="right" nowrap> <div align="center"><font size="-1" face="Arial, Helvetica, sans-serif">
</font></div></td>
<td><div align="right"><font size="-2" face="Arial, Helvetica, sans-serif"><font color="#009900">5th
</font>(2 points)</font></div></td>
<td><font size="-2" face="Arial, Helvetica, sans-serif">
<select name="select15th" id="select15th">
<option value="0" selected>No Achievement</option>
<option value="2">Gained Achievement</option>
</select>
</font></td>
</tr>
<tr valign="baseline">
<td colspan="2" align="right" nowrap><div align="center"><font size="-1" face="Arial, Helvetica, sans-serif">&nbsp;</font></div></td>
<td><div align="right"></div></td>
<td> <font size="-2" face="Arial, Helvetica, sans-serif">&nbsp;
<input name="HFmember" type="hidden" id="HFmember" value="<%= Session("usercookie2") %>">
</font></td>
</tr>
</table>
<font size="-1" face="Arial, Helvetica, sans-serif"> </font><font color="#0000FF" face="Arial, Helvetica, sans-serif"><font color="#FF0000" size="+1"><strong>
</strong></font></font></div></td>
</tr>
</table>
<p><a href="index.asp"><font face="Arial, Helvetica, sans-serif">Back To Main
Page</font></a></p>
<p><font face="Arial, Helvetica, sans-serif">
<input type="hidden" name="MM_insert" value="form1">
</font></p>
</form>
<p><font size="-1" face="Arial, Helvetica, sans-serif">Web League Designed by
<a href="</div>
</body>
</html>
 
where is the code for the hidden var that is not working. Also - just post the relevant bits as that is a LOT of code :)

Also also, is there any code in open.asp that might be resetting the session variables?



Tony
_______________________________________________________________
 
Hi,

Sorry for posting all that code.....

The page is a form that takes users input and stuffs the data into an access database..this all works fine.

But along with what the user adds there is a hidden field and it takes the users log in username and stuffs it into the database along with their input to give a way of sorting records by user later.

The data all goes in except the hidden fields data

<input name="HFmember" type="hidden" id="HFmember" value="<%= Session("usercookie2") %>">

where Session("usercookie2") was set to Request.Form(username) on the main log in page.

There is nothing on the page to reset the values of the vars as far as im aware.

Before the record gets inserted to the database I guess scripting is working ok??

Thanks again Guys
W
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top