Open ASP page with QR code and query string
I can create QR code with a query string on it like http://ereply.us/bc/l.asp?id=mm008 which takes me to a page with a "Submit" button. The submit button, in turn, takes me to a page (Index.asp) with variable content. I'm using session variables and SQL server. What I would like to do is have the QR code scan directly to the Index.asp page and eliminate the intermediate page with the submit button. I'm stumped. Any ideas would be appreciated. Code is below:
"l.asp":
<!-- #include file="database_connection.asp" -->
<%
if not isempty(request("submit")) then
sql="select password, fname, lname, name, coupon, email, ID, barcode, url from C39 where password = '"&trim(request.Form("password"))&"'"
if rs.state=1 then rs.close
rs.open sql,conn,3,2
if rs.recordcount<>0 then
session("password") = rs("password")
session("fname") = rs("fname")
session("lname") = rs("lname")
session("name") = rs("name")
session("email") = rs("email")
session("ID") = rs("ID")
session("barcode") = rs("barcode")
session("coupon") = rs("coupon")
session("url") = rs("url")
if rs("password")<>"" then response.Redirect("index.asp")
else
var_comment="We're sorry, your password does not match. Please try again.."
end if
end if
%>
<html>
<head>
body
<form name="login_form" formid="login_form" action="" method="POST">
<% if var_comment<>"" then %>
<% else %>
<input name="password" type="hidden" class="style4" value=<% response.write(request.querystring("id") ) %>>
<p Please click the "Submit" button to retrieve your coupon.</p>
<input name="Submit" type="submit" id="Submit" value="Submit">
</span><br>
<input type="hidden" name="submit" value="submit; Log In " >
<% end if%>
</p>
</form>
</body>
<script>document.login_form.submit();</script>
</HTML>
And the "Index.asp" contains the following:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!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">
<!-- #include file="database_connection.asp" -->
<head>
<title>Franklin Grande Riviera</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<link href="CSS/Level1_Arial.css" rel="stylesheet" type="text/css"/>
<form action="aspform.asp" method="post">
<p><img src="http://ereply.us/bc/fgr.gif" width="250" height="109" alt="logo" /></p>
<p>
<input name="fname" type="hidden" value='<%=session("fname")%>' />
<input name="lname" type="hidden" value='<%=session("lname")%>' />
<input name="address" type="hidden" value='<%=session("email")%>' />
<input name="id" type="hidden" value='<%=session("id")%>' />
<input name="barcode" type="hidden" value='<%=session("barcode")%>' />
<input name="coupon" type="hidden" value='<%=session("coupon")%>' />
<input name="password" type="hidden" value='<%=session("password")%>' />
<input name="url" type="hidden" value='<%=session("url")%>' />
</p>
<%response.write(session("fname"))%> <%response.write(session("lname"))%>
<%response.write(session("coupon"))%>
</form>
<h1 class="style1">
<script language="JavaScript" src="code39.js"></script></h1>
<h1 class="style1"><script language="JavaScript">
document.open();
document.write
Code39("","",200,12,"<% response.write(session("barcode"))%>",5);
document.close();
</script></h1>
</body>
</html>
