PHP SESSION TRACKING

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ivanstojkovic
Forum Newbie
Posts: 2
Joined: Wed Aug 22, 2007 3:19 am

PHP SESSION TRACKING

Post by ivanstojkovic »

I have one question. I have one system. In this system you can go to one page where you have to fulfill the contract form. There are 5 fields for example. In one of those the person, who fulfills the form, have to insert the name of one member. If the member does not exist. This person get an link where he/she have to enter data for new member. When he/she entered the data for new member he should be automaticly redirected to "contract form" (that is the first form that i have mentioned).
One thing more ... there is also a link "enter new member" on which you can click without fulfilling the "first mentioned form".

So the question... how can i track where i came from?

Which logic and system would you use?
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

how can i track where i came from?
Conditionally generate stuff.

Code: Select all

if ($userExists) {
   echo '<a href="newuser.php">New user</a>';
} else {
   // choose a user
}
Which logic and system would you use?
The only "logic system" you can really use is to control the URLs that the users see and the actions that are performed from accessing those URLs. Only use sessions where you really must.
ivanstojkovic
Forum Newbie
Posts: 2
Joined: Wed Aug 22, 2007 3:19 am

Post by ivanstojkovic »

You did not understand me. I know how to show some link or not. But the problem coms how redirect one page to certain location. I have described my situation.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Dou already have some kind of session? Are those users logged in?
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

how redirect one page to certain location

Code: Select all

header('Location: http://yourdomain.com/place.php');
Post Reply