Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Quick Cookies Question

  • 08-05-2002 12:36pm
    #1
    Registered Users, Registered Users 2 Posts: 8,148 ✭✭✭


    Just finishing off a small site im doing for a project here, and just sawthat cookies are one of the required pieces of the marking scheme etc etc. Due to the fact ive had no tuition in this thx to crap tutors and not a sight of one of them today I was wondering if someoen could tell me how to insert the necessary few lines of code for a cookie to be constructed with ones desired info etc. Thx in advance etc :)


Comments

  • Registered Users, Registered Users 2 Posts: 68,317 ✭✭✭✭seamus


    Language??

    try www.php.net to stick in a php one.......


  • Registered Users, Registered Users 2 Posts: 2,660 ✭✭✭Baz_


    language??

    www.cookiecentral.com a good site and I think the basics of cookies through each language is covered.

    <edit>just noticed seamos reply, all I can say is - spooky. Two question marks as well.</edit>


  • Registered Users, Registered Users 2 Posts: 8,148 ✭✭✭Ronan|Raven


    Oh aye any language :) thx for the sites theyll do nicely


  • Registered Users, Registered Users 2 Posts: 706 ✭✭✭DJB


    ASP and VBScript cookie creation:

    <%
    Response.Cookies("cookienamehere") = value
    Response.Cookies("cookienamehere").Expires = DATE + 180
    %>

    If the value is a number don't use "", but if it is text use "texthere".

    Second line sets the expired date. Above it is today + 180 days. So the cookie will expire in 180 days. Change this to + 7 for expire in one week.

    ASP and VBScript cookie retrieval:

    <% = Request.Cookies("cookienamehere") %>

    Put the above line into a hidden field in a form as the value and the script will insert the value of the cookie into the hidden field.

    You must be on a Windows server running asp to the above and name the file extension .asp.


    Regards,


Advertisement