Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Terms/Condition Button Help!?!?!?!?!
Old 05-21-2007, 10:11 PM Terms/Condition Button Help!?!?!?!?!
Novice Talker

Posts: 5
Trades: 0
Hey folks,
Can someone please point me in the right direction to figuring out how to make a SIMPLE checkbox/button that when clicked will allow access to a secure page? Basically, I am making my homepage with a small "Terms & Conditions" form that must be agreed to before the visitor can enter the "main" site. (No it's not an adult site!) One the person has checked the "Agree" button, they are granted access to the main site....

....but I also dont want them to be able to Bookmark the "main site" after they've agreed and bypass the agree to terms and conditions page either. Essentially, there are ad's on this page that I need my visitor's to see everytime they visit the site. Make sense?

Can someone please point me in the right direction. Thanks!!!!
firecasey is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-21-2007, 10:46 PM Re: Terms/Condition Button Help!?!?!?!?!
jefkin's Avatar
Novice Talker

Posts: 14
Name: Jeff
Location: in front of my computer
Trades: 0
casey,

You can do this with many scripting languages. But the upshot is the logic is mostly the same in all of them.

So, not knowing which language you use, I'll describe the logic in psuedo-code.

Code:
In your scripts:

if (this page is login page) then
  if (check box is checked) then
    set cookie value to logged in.
  endif
  if (cookie value is logged in) then
    redirect to 'main' page.
  else 
    display check box (and adds).
  endif
else if (cookie value is not logged in) then 
 redirect to login/advertising page.
endif 

show 'this' page
this should do the trick.

Even better, in many languages the above can (probably should) be encapsulated in a function that you call from every page.

jefkin
jefkin is offline
Reply With Quote
View Public Profile
 
Old 05-22-2007, 12:13 AM Re: Terms/Condition Button Help!?!?!?!?!
seolman's Avatar
Super Spam Talker

Latest Blog Post:
What are Canonical Links?
Posts: 769
Name: DaveBob Roundpants III
Location: Heredia, Costa Rica
Trades: 0
Jefkin knows what he's talking about... just don't let him choose any colors for you
__________________
"So they have the Internet on computers now?"
Please login or register to view this content. Registration is FREE

seolman is offline
Reply With Quote
View Public Profile Visit seolman's homepage!
 
Old 05-22-2007, 12:36 AM Re: Terms/Condition Button Help!?!?!?!?!
Skilled Talker

Posts: 77
Trades: 0
The easiest way is to probably use cookies.

If you have a static html site, you can accomplish this with javascript, it'd probably take a bit of technical know how to implement it, but I think javascript can handle cookies on static html pages. (I don't really use javascript, though)

If by chance your site is written in perl/cgi I could throw something together, quick & easy, but not many people code sites in this anymore it seems.

You could always do a search in your search engine of choice for "javascript set cookie" or "php set cookie" and there should also be some info on those pages on how you can retrieve the cookies as well.


The above post by jefkin states basically the format the code will use, though you'll have to tweak it according to the coding language used by your website.
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
whooligan is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Terms/Condition Button Help!?!?!?!?!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting 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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.18873 seconds with 12 queries