Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Automatic disclaimer page

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Automatic disclaimer page

Postby Matthijs » Fri Dec 06, 2002 3:41 am

Hi all!
This is my first post. :D

I could use some input on the following topic:

On my webpage, I will show a disclaimer, that will show up on every page, until you click "I have read and understood the disclaimer".

This is not too hard, as I can use cookies for this. Once a user clicked the required button, a small script will set a cookie.

For browsers that do not allow cookies, I want to make it at least work for the duration of the session. For as far as I know I have at least two options to do this without cookies:

1- Add a variable, like ?disclaimer=understood in the URL
2- use a HTTP_POST_VAR to set disclaimer=understood

Both have the disadvantage of having to change all links on my page either by adding the ?disclaimer= or changing the page into a form.


Is there an easier way of transporting information across pages?


Regards,
Matthijs
Matthijs
New php-forum User
New php-forum User
 
Posts: 2
Joined: Fri Dec 06, 2002 2:04 am
Location: The Netherlands

Re: Automatic disclaimer page

Postby wiredme » Sun Dec 08, 2002 10:21 pm

Matthijs wrote:Hi all!
This is my first post. :D

I could use some input on the following topic:

On my webpage, I will show a disclaimer, that will show up on every page, until you click "I have read and understood the disclaimer".

This is not too hard, as I can use cookies for this. Once a user clicked the required button, a small script will set a cookie.

For browsers that do not allow cookies, I want to make it at least work for the duration of the session. For as far as I know I have at least two options to do this without cookies:

1- Add a variable, like ?disclaimer=understood in the URL
2- use a HTTP_POST_VAR to set disclaimer=understood

Both have the disadvantage of having to change all links on my page either by adding the ?disclaimer= or changing the page into a form.


Is there an easier way of transporting information across pages?


Regards,
Matthijs


hello Matthijs:

this is just a trial, but you can bring variable by using session like this
in you 1s t page

<?php
session_start();
session_register("disclaimer"); <==dont put $ in disclaimer

//body here
?>

all pages should have sesions_start(); like
<?
session_start();

//body
?>

$disclaimer will be pass in all pages even if you will now use "?disclaimer="

TY
wiredme
New php-forum User
New php-forum User
 
Posts: 7
Joined: Sun Dec 08, 2002 9:02 pm

Postby Matthijs » Sun Dec 08, 2002 11:33 pm

Hm, looks good. I'll check it out.

Thanks ! :)
Matthijs
New php-forum User
New php-forum User
 
Posts: 2
Joined: Fri Dec 06, 2002 2:04 am
Location: The Netherlands


Return to PHP coding => General

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.