php.net has probably the best information on this subject.
Briefly, you place information in a session like so:
$_SESSION['variable_name_here'] = "foo";
This session will remain until the user logs off or until you destroy
it.
You then access it just like you would any other variable.
$bar = $_SESSION['variable_name_here'];
echo $bar;
// prints 'foo'
~Matt
On Wed, 2004-03-17 at 12:02, Tony Miller wrote:
> I am writing a mailto module to allow folks to make harvest proof links
> easily on their websites. I am almost ready for release but I have one
> more thing I want to accomplish.
>
> When it goes to the thank you form after mailing the information, the user
> is able to refresh the page over and over and over effectively using my
> module to mailbomb someone.
>
> I would like to limit (possibly timewise) the number of times that an
> individual session can mail. I am thinking a 5 minute lag between mailing
> based on how mailtos are usually used. Someone reads a page, decides to
> mailto, and does it. They don't go to each and every link on the page
> sending it stuff (unless they are a spammer and we want to stop that).
>
> I'm thinking of a global variable or something like that (maybe a table
> that stores session and time mailed) but I don't have a good handle on how
> to access the session variable. Does anyone have a tutorial on what
> variables phpwebsite uses to store the session string for a particular
> session? I've grepped the source, and I must have missed something
> because I haven't found the info.
>
> Thanks in advance for your help,
> -Tony
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> Phpwebsite-developers mailing list
> Php...@li...
> https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers
--
Matthew McNaney
Internet Systems Architect
Electronic Student Services
Appalachian State University
Phone: 828-262-6493
http://phpwebsite.appstate.edu
http://ess.appstate.edu
|