login.asp
<%=FormatDateTime(Now(),vbLongDate)%> </B>
<%
BackgroundColor="#AFD1F8"
BorderColor="#000080"
Content = "" 'Clear the Content string
QStr = Request.QueryString("login") 'Save the login querystring to QStr
Title = "Login"
if QStr="passfailed" then
Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center><P>Wrong password</P><A href=Javascript:history.go(-1)>Back</A></td></tr>"
:history.go(-1)>Back</A><BR><BR><A HREF=login.asp>Cancel registration</A></td></tr>"
elseif QStr="namefailed" then
'Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center><P>Invalid username</P><A HREF=login.asp?login=createnew>Click here to create an acount</A><BR><BR><A HREF=Javascript:history.go(-1)>Back</A></td></tr>"
'elseif QStr="createnamefailed" then
'Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center><P>Invalid username</P><A HREF=Javascript:history.go(-1)>Back</A><BR><BR><A HREF=login.asp>Cancel registration</A></td></tr>"
'elseif QStr="creatednew" then
'Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center><P>Your account has been created</P><A HREF=login.asp>Login</A></td></tr>"
'elseif QStr="createnew" then
'Content = Content & "<form name=frmCreate method=POST action=create.asp>"
'Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center><br>Username: <input type=text name=txtUsername></td></tr>"
'Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center>Password: <input type=password name=txtPassword></td></tr>"
'Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center><br>Full name: <input type=text name=txtFullname></td></tr>"
'Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center><input type=submit name=cmdSubmit value=Register></td></tr>"
'Content = Content & "</form>"
else
Content = Content & "<form name=frmMain method=POST action=verify.asp>"
Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center><br>Username: <input type=text name=txtUsername></td></tr>"
Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center>Password: <input type=password name=txtPassword></td></tr>"
Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center><br>Date Range: <input type=text name=txtrange></td></tr>"
Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center><input type=submit name=cmdSubmit value=Login></td></tr>"
Content = Content & "</form>"
'Content = Content & "<tr><td valign=top bordercolor="& BackgroundColor &" align=center><A HREF=login.asp?login=createnew>Click here to create an acount</A></td></tr>"
end if
Response.Cookies("ValidUser") = Validated
%>
<!-- Build the page with the table --><head>
<title>Shipped Orders Login</title>
<div align="center">
<p><img src="/images/dav1.jpg" width="376" height="178"> </head> <body link="<% Response.Write(BorderColor) %>" vlink="<% Response.Write(BorderColor) %>" alink="<% Response.Write(BorderColor) %>" text="<% Response.Write(BorderColor) %>">
</p>
<p><strong><font size="5">Shipped Orders Login</font></strong></p>
<p><br>
</p>
</div>
<div align="center">
<table border="2" cellspacing="5" bgcolor="<% Response.Write(BackgroundColor) %>" bordercolor="<% Response.Write(BorderColor) %>"width="250px">
<%
Response.Write("<tr><td valign=top align=center><b>" & Title & "</b></td></tr>")
Response.Write(Content) ' Paste the contents in the table
%>
</table>
<p> </p>
<p> </p>
<p>
<object classid="clsid

27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
width="740" height="90">
<param name="movie" value="rpt.swf">
<param name="quality" value="high">
<embed src="rpt.swf" quality="high" pluginspage="
type="application/x-shockwave-flash" width="740" height="90"></embed></object>
</p>
</div>
</body>
variables.asp
<%
Username = Request.Form("txtUsername")
Password = Request.Form("txtPassword")
daterange= Request.Form("txtrange")
'Build connection with database
set conn = server.CreateObject ("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath ("..\..\..\shipped.mdb")
set rs = server.CreateObject ("ADODB.Recordset")
'rs.Open "SELECT userid FROM yourtable Where Where FECHNB='" & Session("Username")& "'", conn
rs.Open "SELECT userid FROM userlist where username='" & Session("Username")& "'", conn, 1
Dim range, presentuserid
range=rs("range")
presentuserid=rs("userid")
strKeyField="FECHNB"
strKeyField2=""
strKeyField3=""
strTableName="[WEBQRY].[SHPORD]"
PageSize=20
session("pagesize") = PageSize
strLeftWrapper="["
strRightWrapper="]"
gstrOrderBy=""
bKeyFieldEditable1=False
bKeyFieldEditable2=False
bKeyFieldEditable3=False
'Then your next query comes where in you do this in your where clause
'Where FECHNB='" &presentuserid& "'"
gstrSQL = "select FECHNB, FECVNB, FECBTX, FEAAC3, FEAAC9, FEALDT, FEKNNB, DDAIDT, DDAITX, DDARQT, DDAAGP, EXT_PRICE From WEBQRY.SHPORD Where DHIVNB BETWEEN "&range&" and FECHNB " &presentuserid& ""
vDebug = false
Const FORMAT_NONE = ""
Const FORMAT_DATE_SHORT = "Short Date"
Const FORMAT_DATE_LONG = "Long Date"
Const FORMAT_DATE_TIME = "Time"
Const FORMAT_CURRENCY = "Currency"
Const FORMAT_HYPERLINK = "Hypelink"
Const FORMAT_EMAILHYPERLINK = "Email Hyperlink"
Const FORMAT_FILE_IMAGE = "File-based image"
Const FORMAT_DATABASE_IMAGE = "Database image"
Const FORMAT_LOOKUP_WIZARD = "Lookup wizard"
Const EDIT_FORMAT_NONE = ""
Const EDIT_FORMAT_TEXT_FIELD = "Text field"
Const EDIT_FORMAT_TEXT_AREA = "Text area"
Const EDIT_FORMAT_PASSWORD = "Password"
Const EDIT_FORMAT_DATE = "Date"
Const EDIT_FORMAT_RADIO = "Radio button"
Const EDIT_FORMAT_CHECKBOX = "Checkbox"
Const EDIT_FORMAT_DATABASE_IMAGE = "Database image"
Const EDIT_FORMAT_LOOKUP_WIZARD = "Lookup wizard"
Const EDIT_FORMAT_HIDDEN = "Hidden field"
Const EDIT_FORMAT_READONLY = "Readonly"
Const EDIT_DATE_SIMPLE = 0
Const EDIT_DATE_SIMPLE_DDMMYYYY_DP = 1
Const EDIT_DATE_SIMPLE_MMDDYYYY_DP = 2
Const EDIT_DATE_DDMMYYYY = 3
Const EDIT_DATE_DDMMYYYY_DP = 4
Const EDIT_DATE_MMDDYYYY = 5
Const EDIT_DATE_MMDDYYYY_DP = 6
Const LOGIN_HARDCODED = 0
Const LOGIN_TABLE = 1
Const ADVSECURITY_ALL = 0
Const ADVSECURITY_VIEW_OWN = 1
Const ADVSECURITY_EDIT_OWN = 2
Const ADVSECURITY_NONE = 3
Const ACCESS_LEVEL_ADMIN = "Admin"
Const ACCESS_LEVEL_USER = "User"
Const ACCESS_LEVEL_GUEST = "Guest"
cAdvSecurityMethod = 0
cLoginMethod = 0
cUserName = ""
cPassword = ""
cLoginTable = ""
cUserNameField = ""
cPasswordField = ""
cAdminUserID = ""
cNumberOfChars = 0
%>
so I want to get the input data in the Date Range field in the login.asp to go into the sql statement in the variables.asp
the reason is because it is easier to get the date this way I tried it with this sql statement and it works
select FECHNB, FECVNB, FECBTX, FEAAC3, FEAAC9, FEALDT, FEKNNB, DDAIDT, DDAITX, DDARQT, DDAAGP, EXT_PRICE From WEBQRY.SHPORD Where DHIVNB BETWEEN 1040701 AND 1040710 AND FECHNB = " &presentuserid& ""
the problem is that the date in here is hardcoded and I need it so the user can type it in.
that is why I was adding it to the login page. but if there is a better way to do it please let me know