PDA

View Full Version : dynamic linking


mcambridge
01-15-2007, 10:42 PM
Ah, I've been messin around with it all nite on and off, trying different setups etc. its working fine for me on two different pc systems now.

You must think I'm a right pain as I now have another question..........

there is a variable that can be set to redirect the user to a specific folder afetr login, i.e. the link is www.spiral-focus.com/user/ so if 'mark' logs in, he is automatically redirected to www.spiral-focus.com/user/mark as the script looks for a folder of the same name as the user.

my question is that I want to put a normal hyperlink in the header - 'visit my area' so if mary has logged in then when she clicks the link she is automatiaclly taken to www.spiral-focus.com/user/mary. Heres the redirect thingy:

$slogin_allowuser_redirect = "http://www.spiral-focus.com/user/";

any ideas?

davidj
01-16-2007, 06:03 AM
do you want a link that the user clicks or do you want the page to auto redirect

mcambridge
01-17-2007, 10:25 PM
I would like a link that the user has to click to be taken to their 'area'.

Basically the script appends the username to the redirect url and redirects automatically, but I want is if the visitor has a browse around the site after logging in, then all they have to do to get back to their own 'area' is to click a link

davidj
01-17-2007, 11:01 PM
you dont need to redirect users to there own directory as this would be to hard to administer. Just imagine 50 users or more. (This could be done though if you really want it)

what you could do is taylor the content to the user that logs in so the page after login is taylored and all page after that is shared

mcambridge
01-19-2007, 02:40 PM
I see your point, but the script is designed to redirect automatically to another directory, and the amount of users I'll be having will be minimal due to the nature of the business at the moment.

Basically all I need is a link that will append the logged in users name to the url and redirect accordingly.

davidj
01-19-2007, 02:47 PM
ok

i take it you will have the details of the logged in user in the db

if this is the case then its very simple to add a field in the db with the path to their own dir

or you could go one better.. You could dynamicaly create the dir and the files within once a user registers successfuly

davidj
01-19-2007, 02:55 PM
I see your point, but the script is designed to redirect automatically to another directory


this is very bad practice...

you are allowing a pre written script to drive your project in a path which will cause you headaches in the future

please explaine your consept so i can advise which direction to take. If this project is of a TOP SECRET nature at this stage please feel free to PM or messenger me so we can discuss the best way forward

mcambridge
01-19-2007, 03:04 PM
this is very bad practice...

David, I didnt mean to come accross as ignorant.

Its basically a photography website, as an example, when I shoot a wedding, I would like to create a unique area for the bride and groom to see their images, and for the guests to order re-prints etc, the same applies to portraits etc etc.

As I'm not too hot on databases, I was looking for a simple script and that one seemed the simplest way of doing it, plus my php isnt great (as you've probably guessed!) lol...but i'm getting there!

So thats the situation.............what would you reccomend the best course of action would be?

kind regards

Mark

davidj
01-19-2007, 03:19 PM
ok

this is the best way

you need a PHP system

either learn this yourself or hire a developer. If you choose to do this yourself then we are here to help

before you choose to do this your self you would be required to know the basics of HTML and other relative technologies