geeku Posted August 30, 2006 Share Posted August 30, 2006 Hi there,Can anybody help me to find out the why the code below is not able to send the variable to getting.asp and why the getting not getting the variables from querystring. I am very new to ASP please let me out.Code of sending the information to getting.asp via querrystring<html><body><script type="text/javascript" src="md5.js"></script><%dim present_variable 'for dispalying the user namedim secure_userIDsecure_userID = "guru" & present_variable & "guru"response.write (secure_userID)%><br /><script type="text/javascript" >var hashhash = hex_md5("<%=secure_userID%>");document.write (hash)</script> <br /><% dim hash1hash1= hashresponse.Write(hash1)%> <a href="http://localhost/test/getting.asp?secure_userID=<%=secure_userID%>&hash=<%=hash%>" target="_self" >Link to video </a> </body></html>Code for getting the variables (getting.asp)<html><head><title>Untitled Document</title></head><body><script type="text/javascript" src="md5.js"></script><%dim gotname dim secure_userIDdim gothashgotname = request.querystring("name")gothash = request.querystring("hash") response.write (hash &"<br />")response.write(name)secure = "singh" & name & "guru"%><br /><script type="text/javascript" >var checkcheck = hex_md5("<%=secure%>");document.write (check)</script> <%if ( check = hash ) thenresponse.write("access granted")elseresponse.write("access denied")end if%></body></html>Many thanks,Geeku. Link to comment Share on other sites More sharing options...
aspnetguy Posted August 30, 2006 Share Posted August 30, 2006 you never assign a value to present_variable then use it in secure_userID Link to comment Share on other sites More sharing options...
justsomeguy Posted August 30, 2006 Share Posted August 30, 2006 Another problem is that you send a variable called "secure_userID", and then try to get a variable called "name". I am very new to ASP please let me out.ahh, I love foreigners :)Go, buddy, go! You're free! Link to comment Share on other sites More sharing options...
geeku Posted August 31, 2006 Author Share Posted August 31, 2006 Thanks Guys,My code was very badly writen. I was acessing javascript in asp if statement which cannot be posible. Well I have corrected it and it is working now.Many thanks for your help!!Regards,Geeku. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now