The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> PHP Development
|
How do Confirmation and Popup Warnings work?
Discuss How do Confirmation and Popup Warnings work? in the PHP Development forum on Dev Shed. How do Confirmation and Popup Warnings work? PHP Development forum discussing coding practices, tips on PHP, and other PHP-related topics. PHP is an open source scripting language that has taken the web development industry by storm.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

January 21st, 2013, 03:58 PM
|
|
|
|
How do Confirmation and Popup Warnings work?
When you go to a site, sometimes there are Service Agreements and Mature Age content popups that appear where you have to confirm to accept the terms or that you confirm you are of mature age or you can select to decline and be redirected to another page.
How do these systems work. Is it just a temporary wall or is every person that confirms or agrees, their IP or account details are stored in a database.
If the latter, does a website really need to store confirmation information for legal reasons or will a popup wall be good enough??
Some Examples:
- a blog which contains some mature topics of discussion and require mature age confirmation
- a website that when users enter, they must confirm in the popup to the websites terms and conditions
- an order of product online and user confirms their online order
If you can think of any other examples, please feel free to add.
Thanks
|

January 21st, 2013, 04:10 PM
|
|
|
|
This is really an HTML question. See the 'target' attribute of <a> tags.
__________________
There are 10 kinds of people in the world. Those that understand binary and those that don't.
|

January 21st, 2013, 04:36 PM
|
 |
Still alive
|
|
Join Date: Mar 2007
Location: Washington, USA
|
|
The underlying mechanisms [edit] of making the actual popup itself [/edit] are either HTML or Javascript questions, depending on how you make them work.
As for the reasoning it's often about reducing liability or about ensuring users cannot get away with harming the site (as an entity) or its content.
Naturally, IANAL and you should consult one if you have serious questions about this.
Quote: | Originally Posted by rePete How do these systems work. Is it just a temporary wall or is every person that confirms or agrees, their IP or account details are stored in a database.
If the latter, does a website really need to store confirmation information for legal reasons or will a popup wall be good enough?? |
Generally you don't need a record of them consenting: the fact that they made it through the rest of the process is proof enough.
Quote: | Originally Posted by rePete - a blog which contains some mature topics of discussion and require mature age confirmation |
Though often ineffective and arguably worthless, the gate limits the website's liability in terms of (hypothetically) having shown adult content to minors. Think of it like plausible deniability.
Quote: | Originally Posted by rePete - a website that when users enter, they must confirm in the popup to the websites terms and conditions |
They often include terms which will prohibit a user from exploiting the open nature of the web (such as scraping content and offering it elsewhere) and in essence give the website recourse if the user acts like a douche.
Quote: | Originally Posted by rePete - an order of product online and user confirms their online order |
Less legal more "we recognize that sometimes users make mistakes and we want to reduce the amount of problems resulting from mis-clicks or bad information". Without the confirmation a particularly abusive user could raise hell if they "accidentally" did something harmful, like to themselves or their reputation. It gives the website operators the chance to say "you confirmed the purchase so too bad".
Last edited by requinix : January 21st, 2013 at 05:34 PM.
Reason: clarifying the "underlying mechanisms" bit
|

January 21st, 2013, 05:12 PM
|
 |
Square Peg in a Round Hole
|
|
Join Date: Oct 2007
Location: North Yorkshire, UK
|
|
The result of the prompt is then often stored in a "session variable" for the duration of the visitors stay on the site ("session").
For a session variable to work there will be a server side data store with each visitors information identified by some id which is also issued to the visitors browser in the form a cookie.
On subsequent requests the value in the cookie is sent back to the website and the web app can then access the user's original information (namem 'I agree', 'I am older than ...' etc) and make an appropriate choice
PHP has some very nice session support:
Just call the session_start() function at the top of every page you want to use session variables on, then use the super-global $_SESSION variable as an array
|

January 21st, 2013, 05:13 PM
|
 |
Lost in code
|
|
|
|
Quote: | How do these systems work. Is it just a temporary wall or is every person that confirms or agrees, their IP or account details are stored in a database. |
When the user accepts the prompt a cookie is set indicating that they've accepted it. If the cookie is present when they visit the site, then the prompt isn't shown again.
|

January 21st, 2013, 05:29 PM
|
|
|
Quote: | - a blog which contains some mature topics of discussion and require mature age confirmation | Use sessions or cookies.
Quote: - a website that when users enter, they must confirm in the popup to the websites terms and conditions
- an order of product online and user confirms their online order | Store the information in a database.
To send the data from the client, you would either use a traditional form or ajax (use post for both).
|

January 22nd, 2013, 03:52 AM
|
|
|
|
I would just like to point out that recently a website of a popular "XXX" channel was done by the authority for providing mature content to children. They said that simply asking the users to confirm if they are over 18 is not a proper way to control access!
I am not sure how this ruling affects other blogs though :s
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|