|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
Ok, this is what i'm trying to achieve. On a webpage, i have a log-in box to enter username and password. When someone enters their details correctly, they get taken to the member area. I'm having a bit of a problem with the last bit (because i dont know the code).
this is what i have so far.
[] <b> <font size="1" face="Tahoma>Client <font color="#800000">Login </font> </font> </b> <br> <form action='/whmap/clogin.php' method='POST'> <input style= size='30' maxlength='50' type='text' name='username'> <input style= size='30' maxlength='50' type='password' name='password'><br> <font size="1" face="Tahoma"><font color="#800000"> </font><form action='/whmap/clogin.php' method='POST'> <font color="#800000">login</font></a></font></TD> [/]
I've edited out the unnessecary stuff (like the spacing between the boxes etc, so hopefully thsat wont matter. Now then, where i've got the "login" text just above, I want that bit of text to act as the link on the page that pulls the inputted information together and sends it to /whamp/clogin.php page to check the information is correct, before allowing access to the members section. Have i explained clearly enough? (not one of my strong points!) thanks!
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
That looks like HTML to me. Try this: <form action='/whmap/clogin.php' method='POST'> <input size='30' maxlength='50' type='text' name='username' class='formboxes' /> <input size='30' maxlength='50' type='password' name='password' class='formboxes' /> <input type='submit' name='submit' value='Submit' class='buttons' /> </form>
|
|
|
|
Joined: Aug 2002
Posts: 1,191
Kahuna
|
Kahuna
Joined: Aug 2002
Posts: 1,191 |
...and make sure that in the clogin.php page you read the username and password variables, check them and if correct redirect them to the members area otherwise show them an error.
I don't know how you will prevent unauthorized people in your members area but one way is upon login to set up a cookie on the user's machine and then on each page check it to see if the user is logged in.
I hope this helps.
Nikos
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
how can i do it without a "Submit" button though? I just want a little bit of text which says "login" to do this.
Lol, yeah, it was html, i was trying to adapt some php code i had in front of me. Been a long day..........lol
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Well - there's no such thing as a form without a submit button.... a form doesn't do anything except give you boxes to type in without a submit button. You have to post the data you enter to somewhere where you'll gather the variables and then do something with them (authenticate etc...).
|
|
|
|
Joined: Dec 2000
Posts: 1,471
Addict
|
Addict
Joined: Dec 2000
Posts: 1,471 |
You can do that with javascript. When hitting the enter key a javascript could submit the form. So you don't need a submit button. But users have to enable javascript, otherwise it won't work.
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 1,157
Joined: July 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|