external .php login

hazard

Inactive User
Joined
Feb 27, 2007
Messages
25
Reaction score
0
:aggressive: Does anybody know how to create an external 'login' page in .php with only a username, password and login button? Please help.
 

Mick

Administrator
Staff member
Administrator
Premium Member
Joined
Jan 19, 1999
Messages
32,082
Reaction score
8,758
what you trying to do ?

you could hide a password and username in a variable but its basic you, would need to define usernames and passwords in either mysql or a text file if you want to spread it across users or maybe to sets of arrays but that would mean editing the php page all the time to change or update.....but if you parse this below from a form on a page and change the content in the echo it should work


wrote this really fast so could be messy

PHP:
You don't have permission to view the code content. Log in or register now.
 
Last edited:

Mick

Administrator
Staff member
Administrator
Premium Member
Joined
Jan 19, 1999
Messages
32,082
Reaction score
8,758
dont forget you need to make a page that contains the html form that contains the data

for example

PHP:
You don't have permission to view the code content. Log in or register now.

added a bit of javascript to popup the page
 
Last edited:

Mick

Administrator
Staff member
Administrator
Premium Member
Joined
Jan 19, 1999
Messages
32,082
Reaction score
8,758
Last edited:

hazard

Inactive User
Joined
Feb 27, 2007
Messages
25
Reaction score
0
Yes I would like it to connect to the MSQL for the database of users. Im already using phpbb2 and that has a login.php but I was after one that does not have the header.tpl or footer.tpl. I had already tried just removing the header and footer but for some strange reason the page will not work without them?

Sorry I am so confused as i can't get your way to work.

Just a quick not there is ment to be 2 fields to enter the data into:
Username
Password
 

Mick

Administrator
Staff member
Administrator
Premium Member
Joined
Jan 19, 1999
Messages
32,082
Reaction score
8,758
give me a copy of the login script (upload it in a zip)

i still dont know what you are trying to do ?

what i have posted above is a simple script to set a password i could add a username if you wished aswell but its not worth it now

but to make it connect with your forums software i would need to know how the script and forum software works, you should really ask for help in the development site and original makers site they more than likely have what you are after m8

Regards
Mickie D
 

Mick

Administrator
Staff member
Administrator
Premium Member
Joined
Jan 19, 1999
Messages
32,082
Reaction score
8,758
just had a thought if you dont want to use the templates why dont you just empty the content off them so they are a blank file then you would not need to use them ?

PS i would look at it for the login code as u wil need that bit to make it work
 

Mick

Administrator
Staff member
Administrator
Premium Member
Joined
Jan 19, 1999
Messages
32,082
Reaction score
8,758
detail me your problem, i dont know what you want with this script

Regards
Mickie D
 

hazard

Inactive User
Joined
Feb 27, 2007
Messages
25
Reaction score
0
I would but I am not allowed to use PM?

1. I already have a login.php... I need another, new_login.php but with only the fields like I had shown you in that picture I had edited.

2. In this new_login.php I would like it not to have a header.tpl.

3. In this new_login.php I would like:
. Error (wrong password) to redirect them to the same page. If possible with a message that can pop up telling them it's wrong.
. When the user logs in it will automaticly redirect them to a .php which I can change the address.
 

Mick

Administrator
Staff member
Administrator
Premium Member
Joined
Jan 19, 1999
Messages
32,082
Reaction score
8,758
I would but I am not allowed to use PM?

1. I already have a login.php... I need another, new_login.php but with only the fields like I had shown you in that picture I had edited.

2. In this new_login.php I would like it not to have a header.tpl.

3. In this new_login.php I would like:
. Error (wrong password) to redirect them to the same page. If possible with a message that can pop up telling them it's wrong.
. When the user logs in it will automaticly redirect them to a .php which I can change the address.


well you dont have enough posts and helping on the forum will benifit others with the same issue

yo have a few flaws in your plan m8,

1, is possible

2, as i said blank the header so there is no code as its needed by the scripts to work

BUT!!!!

without templates how can you see anything ?, the templates make the page work... code without html to see detail will never work as it will be blank

3, is very hard to achieve because you need to send a php page that has the codes used by that software, you cannot direct code to a page that does not understand it ?

you will need to use all the include tags that refer to the pages you would also need to incorporate all sessions, cookies.

4, i think you should look for a "custom page" hack for that software via the dev board for this forum software... what you are asking is possible as most things are but i dont have enough time or any knowledge of this software to even begin

5, my code will never work with your software because that is just some plain and simple variable called (used as a password to allow access via the echo codes) to open up the content within, its very basic but works (would be nice with a session timeout which is quite simple to achieve ;)

Regards
Mickie D
 
Last edited:

JIMMYQ

DW Regular
Joined
Nov 26, 2004
Messages
7,177
Reaction score
27
Location
DW
h**p://www.dynamicdrive.com/forums

or if not you can use this

h**p://www.webmaster-toolkit.com/htaccess-generator.shtml
 

hazard

Inactive User
Joined
Feb 27, 2007
Messages
25
Reaction score
0
It's OK now guys, thak you anyways but I finally managed to sus the problem. The answer was to remove both the includes header.tpl and includes footer.tpl and instead have a stylesheet.css.: colors1
 
TEST
Top