Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Dec 2004
Posts: 6
Junior Member
Junior Member
Offline
Joined: Dec 2004
Posts: 6
Hello everyone!
This board is a great resource!

I've looked at all the posts about cookies I could find...too many haha and I was wondering if you all could help me.

I want to store the user's post count on log-in to the cookie file.

Then I want to be able to read that post count from the cookie using javascript.

I have this for reading the cookie:
Code
<script language="Javascript1.1" type="text/javascript">
<!--

var session_cookie = getCookie('sessionBOARDSESSIONNUMBERREMOVED');
if (session_cookie == null) {
var session_dt = "0";
var session_j = "0";
} else {
var session_array = session_cookie.split("&");
var session_dt = session_array[0];
var session_j = session_array[1];
}

function getCookie(name) {
var cname = name + "=";
var dc = document.cookie;

if (dc.length > 0) {
begin = dc.indexOf(cname);
if (begin != -1) {
begin += cname.length;
end = dc.indexOf(";", begin);
if (end == -1) {
end = dc.length;
} // end if
return (dc.substring(begin, end));
} // end if
} // end if
return null;
}

//-->
</script>
and I've also looked through the ultimatebb.cgi where it stores cookies, but I keep doing something wrong.

Any help is appreciated. I am running version 6.7.

Thank you!
smile

Sponsored Links
Entire Thread
Subject Posted By Posted
Storing and Reading Post Count to/from Cookies Rainman 12/08/2004 8:50 PM
Re: Storing and Reading Post Count to/from Cookies Charles Capps 12/08/2004 9:32 PM
Re: Storing and Reading Post Count to/from Cookies Rainman 12/08/2004 11:32 PM
Re: Storing and Reading Post Count to/from Cookies Ron M 12/08/2004 11:58 PM
Re: Storing and Reading Post Count to/from Cookies Rainman 12/09/2004 12:34 AM
Re: Storing and Reading Post Count to/from Cookies Ian Spence 12/09/2004 12:46 AM
Re: Storing and Reading Post Count to/from Cookies Charles Capps 12/09/2004 1:19 AM
Re: Storing and Reading Post Count to/from Cookies Rainman 12/09/2004 2:27 AM
Re: Storing and Reading Post Count to/from Cookies Rainman 12/09/2004 11:46 AM
Re: Storing and Reading Post Count to/from Cookies Brett 12/09/2004 2:16 PM
Re: Storing and Reading Post Count to/from Cookies Rainman 12/09/2004 9:57 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)