Accounts Link Redirects From Seller To Buyer
Scenario
At my homepage [login to view URL], if a user is not logged in and clicks the seller link on the top toolbar, he is asked to login at /login/sellers/. Once the credentials are submitted, if the user has an account but its not a sellers account, I want a script to redirect them to the /accounts/ page which is for buyers. Otherwise, the actual seller with the proper password will login and be able to access the /sellers/ page... as the link on the toolbar indicates.
There is a column in the accounts table called "accesslevel".
buyers = 1 sellers = 2
On my SQL statement at /sellers/ is:
SELECT *
FROM accounts
WHERE [login to view URL] = TM_username AND accesslevel = '2'
This works in one way. Because if he's a user (buyer) but not a seller, I have a "Show if Recordset is Empty" showing this message "There is no sellers account setup." ....see sample image. I prefer not to show this message but rather to redirect the buyers (that have an accesslevel of 1) to the accounts page located at /accounts/.
I believe that requires a very small "if statement"
Scripting Language: PHP using Dreamweaver CS4
-----------------------------------------------------------------------------------------------------------------------
INFORMATION PROVIDED:
Above, I have provided what I believe is all the information regarding this project with exception to login information to the FTP & database. Please base your bid on this but I will be happy to answer questions and exchange correspondence through this website's personal message board during the development of this work. Try to keep in mind of time zones differences if responses aren't immediate.
SELECTION PROCESS:
Not required but it is very helpful when the service provider explains in very short detail your approach & end results of the work in completing this project here.