Skip navigation
Currently Being Moderated

Grabbing Cookies for PHP?

Jun 20, 2012 6:59 AM

I'm still some what a beginner with CF so take it easy on me. I currently have a web site that uses MyBB as a forum. My homepage/portal is programmed in coldfusion. Currerntly it is gathering post information so it shows latest posts and comments. I want users to be able to login here as well and then it redirect back to the homepage/portal. The login script works flawlessly, however, once someone logs in I want to be able to retrieve the cookies from myBB and then output the current user's username, userid, email, ect.

 

How would I retrieve the cookies information and then output the information with coldfusion?

 

Thanks!

 
Replies
  • Currently Being Moderated
    Jun 21, 2012 10:49 AM   in reply to FuelieOrg

    You can display any cookie in ColdFusion like this:

     

    <cfoutput>

    #cookie.cookiename#

    </cfoutput>

     

    If you want to see all the cookie names you can do this:

     

    <cfdump var="#cookie#">

     

    Hope that helps.

    --

    Pete Freitag

    Foundeo Inc. | HackMyCF.com

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 25, 2012 3:26 AM   in reply to FuelieOrg

    I also agreed with Peter Freitag.  For outputing the cookie's information  in cf code, use <cfoutput> tag. The syntax is

     

    <cfoutput>#cookiesname#</cfoutput>.

     

    For see the cookie name for the revision <cfdump> tag is used in the code.Syntax is

     

    <cfdump var="#cookiename#">

     

     

    Thanks

     

    Bipin

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points