Jump to content

This topic is 8571 days old. Please don't post here. Open a new topic instead.

Recommended Posts

ok having a problem with cookies.. i can set them fine.. but when i call the info from the cookie i have a problem... it displays the cookie tag instead of the cookie info when i call for the cookies..

here is my code

code:


<html>

<head>

</head>

<body>

<B>

<P>Hello [FMP-Cookie: Cookiename1, raw] [FMP-Cookie: Cookiename2, raw], aka [FMP-Cookie: Cookieuser, raw]. Your password is [FMP-Cookie: cookiepw, raw].

<BR> [FMP-Cookie: Cookiedept, raw] [FMP-Cookie: Cookielevel, raw].

</B>

</body>

</html>


and this is what it displays in the browser when i call it.

Hello [FMP-Cookie: Cookiename1, raw] [FMP-Cookie: Cookiename2, raw], aka [FMP-Cookie: Cookieuser, raw]. Your password is [FMP-Cookie: cookiepw, raw].

[FMP-Cookie: Cookiedept, raw] [FMP-Cookie: Cookielevel, raw].

am i doing something wrong.. why is it displaying the tag instead of the cookie info??? the cookie is being set correctly because i can go into my cookie folder and see it there..

also, all the cookie names are correct i checked that one already.. am i just making a stupid mistake here, or what?

Link to comment
Share on other sites

the problem is more than likely on the page you set the cookie from. Check to make sure the link is a FMPro? link and not a standard HTML link, otherwise the cookie won't pass. The setting of the cookie obviously is working. So it seems to be the passing of the cookie that is failing. Take a look at the code on the SetCookie page to see how it is passed.

yafreax

Link to comment
Share on other sites

ok here is what i do.. i have a login screen where a person enters there name and password.. and it searches a database for those two feilds and on the next page it writes all the information from the record to a cookie..

code:


<html>

<head>

</head>

<body>

<BR>[FMP-field: firstname]

<BR>[FMP-field: lastname]

<BR>[FMP-field: username]

<BR>[FMP-field: password]

<BR>[FMP-field: dept] [FMP-field: level]

[FMP-SETCOOKIE: Cookiename1=Field: firstname, EXPIRES=5256000]

[FMP-SETCOOKIE: Cookiename2=Field: lastname, EXPIRES=5256000]

[FMP-SETCOOKIE: Cookieuser=Field: username, EXPIRES=5256000]

[FMP-SETCOOKIE: Cookiepw=Field: password, EXPIRES=5256000]

[FMP-SETCOOKIE: Cookiedept=Field: dept, EXPIRES=5256000]

[FMP-SETCOOKIE: Cookielevel=Field: level, EXPIRES=5256000]

</body>

</html>


now how would i set it to automatically go to the next page to display the cookie.. this is just like a test thing i am doing just to kind of show my boss it can be done.. i know it is not the most secure way to store login names and passwords but i am not worried about that.. just wondering how to get it to go to the next page and still be able to display the cookie.. i orignally just used a javascript code to redirect the page to the displaycookie.html page i had made.. but it wouldn't display the cookies.. how would i go about doing it?? and this means i can only call the cookies if they are on a page that was linked to using the fmpro? can i call these cookies any other way without using CDML.. isnt there away to call them using javascript???

Link to comment
Share on other sites

To automatically forward it, and pass the cookies, just put a <meta> tag in the header like:

<head>

<meta http-equiv="refresh" content="1; url=FMPRo?-db=blah&-lay=blah&-format=blah.htm&-view">

</head>

all that other stuff in your code.

to explain the above, the meta http-equiv="refresh" just tells the page it's going to automatically refresh. The content has two parts the "1" is the amount of time before the refresh (or forward in this case) followed by a ";" and "URL=" which, obviously specifies the page you wish the browser to automatically forward to. Place the quotes only where they are placed above or it won't work right. then everything should be okay.

Link to comment
Share on other sites

thanks... that's not exactly what i need.. but it helps alot.. i really just needed the part on how to set up the url.. thanks alot man.. you are a life saver.

i am using this code instead of the meta tags because i need it to wait until everything on the page loads.. before it goes on to the next page..

code:


<script>

<!-- hide from old browers

/*-:bman;-*/

function GoToURL()

{

document.location = 'FMPRo?-db=user.fp3&-lay=pw&-format=displaycookie.html&-view';

}

// done hiding from old browsers -->

</script>


then i call it like this..

<body onload="GoToURL()">

this way it will go to the next page once this page has been fully loaded..

[This message has been edited by bman (edited December 01, 2000).]

Link to comment
Share on other sites

This topic is 8571 days old. Please don't post here. Open a new topic instead.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.