I am not very good with this PHP or SQL malarky. Infact, I couldn't write it for toffee but I can follow bits.
I have downloaded this free script called PHP Login Script 2.0 and the code redirects all users to the same page (myaccount.php) - I would like each user to be redirected to their specific page though when logging in.
i.e.
- Person 1 logs in and is redirected to Page1.php
- Person 2 logs in and is redirected to Page2.php
In the database, I use to have 3 fields for id, username and password but I have just created a new field for 'destination' where I thought the page name they were allocated to could be stored.
For the code I currently have for the redirection, I have the standard:
header("Location: myaccount.php");
I appreciate this post is probably quite vague and I need to put more PHP in to identify what the destination page is for each user when they log in so I would appreciate any guidance etc on this.
Thanks
I have downloaded this free script called PHP Login Script 2.0 and the code redirects all users to the same page (myaccount.php) - I would like each user to be redirected to their specific page though when logging in.
i.e.
- Person 1 logs in and is redirected to Page1.php
- Person 2 logs in and is redirected to Page2.php
In the database, I use to have 3 fields for id, username and password but I have just created a new field for 'destination' where I thought the page name they were allocated to could be stored.
For the code I currently have for the redirection, I have the standard:
header("Location: myaccount.php");
I appreciate this post is probably quite vague and I need to put more PHP in to identify what the destination page is for each user when they log in so I would appreciate any guidance etc on this.
Thanks