Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

Creating an Admin Login that sends you to Cpanel?

Hello Team Treehouse! I was wondering if it is at all a possibility to create a login form which would allow the admin to log in to the control panel from the main page of the site. For instance, loading up mydomain.com to reveal a login page, which in turn allows you to enter your admin information and then directs you to the cpanel, rather than having to type mydomain.com/cpanel or cpanel.mydomain.com?

How would I go about doing this?

3 Answers

I'm not 100% sure what you are asking but you could use an iframe so when someone goes to mydomain.com they see an login form that is actually an iframe of mydomain.com/cpanel

I am building a site with a partner and would like him to be able to create a new account within my servers database which would allow him access to the cpanel so that we can both modify the site at our own leisure.

If I go your route, how would I go about placing the cpanel login on www.yugenweb.com? Would it really just need to be an iframe, no PHP or anything else involved?

I'm guessing so, you don't really want to be messing with cPanel authentication.

You're probably right. Sounds like it presents a huge security breach or the ability to completely break my server. Oh well, I guess I'll just make a regular splash page that encourages people to come back at a later time.