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.

PHP Forum


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



Freelance Jobs

Reply
Old 10-15-2005, 03:24 AM Form help!
Average Talker

Posts: 24
Trades: 0
Hi there,

I have created a "terms and conditions" form using a script for my website. I have named this form register1.php. Once users agree to terms, the get redirected to register2.php where they need to fill out their name, details,etc.

The problem that I'm having is that if users just type mywebsitename/register2.php, they get send directly to the registration page totally bypassing the "terms and conditions" (register1.php) form and I don't want that.

What can I add or what can I do to deny people access to register2.php if they haven't agreed to register1.php?(terms and conditions) maybe add a message saying that they need to agree to register1.php befoe gainning access to register2.php?


Thanks
emrique007 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-15-2005, 03:31 AM
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Using cookies/sessions and asking this in the PHP forum would be the right place to start.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-15-2005, 06:32 AM
Mooofasa's Avatar
Defies a Status

Posts: 1,611
Name: Michael (mik) Land
Location: England
Trades: 0
Quote:
Originally Posted by chrishirst
Using cookies/sessions and asking this in the PHP forum would be the right place to start.
Three more posts and you are entitle to a custom rank title.

Anyway, Chris is correct. You need to use session variables to create cookies that store information for a user to proceed. How does it work?
A check cookie script is put into the page you want restricted access to, that only allows users with the cookie created in the previous process access. Without the cookie and the session details within it, the user is either blocked or redirected back to the form. I believe this can be done with javascript, ASP or PHP.
__________________

Please login or register to view this content. Registration is FREE
- Tumblog with thoughts, quotes, links, videos, images and my creations.

Please login or register to view this content. Registration is FREE
- The best free web browser.

Please login or register to view this content. Registration is FREE
- Firefox is now Firefail.
Mooofasa is offline
Reply With Quote
View Public Profile Visit Mooofasa's homepage!
 
Old 10-17-2005, 09:32 AM
funkdaddu's Avatar
Web Design Snob

Posts: 635
Trades: 0
Or just use PHP to check the referring url, and if it's not register1.php, then redirect to that address.

And yeah, why is this in the JS forum?
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
Old 10-27-2005, 11:36 PM
extermin8tor's Avatar
Super Talker

Posts: 129
Location: MARS!!
Trades: 0
good point everyone. cookies is a good idea
__________________

Please login or register to view this content. Registration is FREE
The Light at the end of the tunnel just switched off!
extermin8tor is offline
Reply With Quote
View Public Profile
 
Old 10-30-2005, 01:56 PM
lizard dude's Avatar
Super Talker

Posts: 119
Location: France
Trades: 0
I don't see why this is doing in javascript section but yeah you could use cookies. Or you can direct them only to the register1.php and if they click on "ok" of your terms and conditions, make them go to register2.php But only if they've clicked on "ok".
I'm not sure if this is the easiest way to do it but it works.
__________________
forum------->
Please login or register to view this content. Registration is FREE
, for people who wants to have a good time ;)
website------>
Please login or register to view this content. Registration is FREE
(might be in construction :D)
Hope you have a great time and that my post is helpfull ;)
lizard dude is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Form 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.22697 seconds with 12 queries