Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How do I have different login pages but on the same URL?

New Here ,
Mar 09, 2012 Mar 09, 2012

I want to have different sing in pages but all link to the same database. How do I do this without changing the domain everytime.

Example:

1st Login Page: http://mywebsite.com/login.html

2nd Login Page: http://mywebsite.com/login2.html

ect.

How do i have it so my login pages would be:

1st Login Page: http://mywebsite.com/login.html

2nd Login Page: http://mywebsite.com/login.html?SOME_CODE_HERE

or

1st Login Page: http://mywebsite.com/login/?SOME_CODE_HERE

Thanks

TOPICS
Server side applications
776
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 09, 2012 Mar 09, 2012

First of all, please don't use a bad url to real domain for an example. Use example.com - that's what it's for.

>How do I do this without changing the domain everytime.

I don't understand your question. Why would you need to change the domain at all?

If you want your page to display different content based on the querystring, that's simple.

For example, you could have

http://example.com/login.php?formid=1

http://example.com/login.php?formid=2

The script in your login.php page would evaluate the value of the querystring and branch accordingly.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 10, 2012 Mar 10, 2012

Well sorry. What script would I need to display two differen types of login pages but the same URL. For example:

http://example.com/login.php?formid=1 and http://example.com/login.php?formid=2

If i wanted my first login page to display a advertising logo and advertising inforation to login and my second login form to show information about genral account login. I would create two different login pages in Dreamweaver but want them on the same domain (http://example.com/login.php)) What code would I need to when I go http://example.com/login.php?formid=1 it goes to one of my login pages.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 10, 2012 Mar 10, 2012

Well there are a few different methods. Your login.php script could look at the querystring value, and then redirect to another page based on that value, or, you could use conditional statements to display the appropriate html on the login.php page itself. Do you have experience with php or any other programming language?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 10, 2012 Mar 10, 2012
LATEST

Ahh thanks. I have had about 1 1/2 years experiece becuase i have taught my self from youtube. Any way is there any tutorials that you know of?

(BTW im only 14.)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines