Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Confidentiality Page

Confidentiality Page
Thread Tools
Junior Member
Join Date: Feb 2000
Location: Southern California
Status: Offline
Reply With Quote
Nov 23, 2003, 11:41 PM
 
Hello, using GoLive in a HTML site, how to create a confidentiality page that will remember what the user inputs? Is this a cookie thing?

Just two buttons, YES or NO, the negative answer will shoot them back to the home page, and a positive answer will avoid the user having to see the page again.


Thanks much for the help, as I've often found this forum very useful!
     
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Nov 24, 2003, 06:23 AM
 
heh, i was going to suggest you check out: php.net/setcookie

i just did though, and i get this:
Parse error: parse error, expecting `')'' in /home/httpd/htdocs/include/layout.inc on line 29

Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/htdocs/include/layout.inc:29) in/home/httpd/htdocs/include/shared-manual.inc on line 49

Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/htdocs/include/layout.inc:29) in/home/httpd/htdocs/include/shared-manual.inc on line 51

Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/htdocs/include/layout.inc:29) in/home/httpd/htdocs/include/shared-manual.inc on line 52

Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/htdocs/include/layout.inc:29) in/home/httpd/htdocs/include/shared-manual.inc on line 53

Fatal error: Call to undefined function: make_link() in /home/httpd/htdocs/include/shared-manual.inc on line 154
oops! not the best advert for php, is it?
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
Senior User
Join Date: May 2001
Location: Nottingham, UK
Status: Offline
Reply With Quote
Nov 26, 2003, 08:47 AM
 
Hey mugwump - have you sorted this yet? If not, let us know. It's pretty straightforward to set/retrieve cookies with javascript.

Only thing is you'll need some JS code on the top of every page you want confidential. Also it's pretty simple to crack by disabling javascript.

phil - those error messages are the reason why i never got stuck into php. damn! i'm guessing you have to send the php before the first html tag ..?
     
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Nov 26, 2003, 05:17 PM
 
Originally posted by derbs:
Hey mugwump - have you sorted this yet? If not, let us know. It's pretty straightforward to set/retrieve cookies with javascript.

Only thing is you'll need some JS code on the top of every page you want confidential. Also it's pretty simple to crack by disabling javascript.

phil - those error messages are the reason why i never got stuck into php. damn! i'm guessing you have to send the php before the first html tag ..?
I didn't see that error - must've been a temporary update thing???

Yep - you need to send all headers before ANY page data arrives (including 'whitespace'). There was probably an error in the PHP that forced a message to the browser before the header command, which in turn made PHP complain that headers had already been sent... and so it goes...

I must admit I haven't toyed with JavaScript cookies properly, but I would certainly recommend some form of Server-side cookie settings to implement the privacy page. ASP, PHP, even (gasp) Lasso will all have some way to implement this.
Computer thez nohhh...
     
Senior User
Join Date: May 2001
Location: Nottingham, UK
Status: Offline
Reply With Quote
Nov 27, 2003, 08:20 AM
 
yep, server side would be the ideal way to do this. Unless it's just a simple "are you over 18" porno site
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:27 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2