View Full Version : PHP Login area
PcMan
05-19-2005, 02:03 AM
Ok guys i got a php login thing setup, now all i need is your help on get login area box on my home page to work. For example if i had a login area on my index page like:
Member Login: <----Text Box for Members Login
Password: <-------Password Box
[Submit] <-----A Button to login from the home page!
Thts all for now, if you can please provide me with a simple script would be nice.
Thanks
CrAzY_J
05-19-2005, 05:25 AM
If you use mysql:
first grab the submitted data
<?
if(!empty($_POST['/'] && !empty($_POST['q'])){
Then see if the data matches any record in the mysql database :)
PcMan
05-19-2005, 04:10 PM
:confused: I really don't know where to put the code you guys gave me. Little tutorial will help. THanks for all your help!
Velox Letum
05-19-2005, 07:12 PM
http://biorust.com/index.php?page=tutorial_detail&tutid=115
PcMan
05-20-2005, 04:45 PM
thats tutorial doesn't really tell me how i can do what i want to do. Thanks anyways. Please keep helping me! :(
PcMan
05-20-2005, 06:11 PM
Hokay! I guess no one really gets what i am tring to say. Well here see if this helps:
If you look at thisClick here for the template! (http://www.4templates.com/view/search=4x5S0KTtq6iBSoUJlUZBpqk1FblhWpkhgoN3KlyNxSSOjMTBEPDsSJQUWYlSFUUmJna8pXCIuA1nRGqnlWiiU5AXKL0zA DgaU5kYl5XaJFrk1_ZdtAgzpHC7/1/VA0123OR)
And if you scroll down to the "Home Page Preview", you should see a Account login area, thats what i am tring to say. Like say that was my template, what would i have to edit in the entire login area, or the Submit button.
Hope that helped, thanks, and please help me asap.
singedpiper
05-20-2005, 09:43 PM
that portion of the page is just a css styled html form... that's how a user is expected to input data into a php script... there is a tutorial on html forms at w3schools... just google it.
here's an example of such a form:
<form method="POST">
login name: <input type="text" size="20" name="login">
password $nbsp;:<input type="text" size="20" name="password">
<input type="text" size="20" name="q" value="password">
<input type="submit" value = "login" />
</form>
the etire html file to see an example is:
<html>
<body>
<form method="POST">
login name: <input type="text" size="20" name="login">
password $nbsp;:<input type="text" size="20" name="password">
<input type="text" size="20" name="q" value="password">
<input type="submit" value = "login" />
</form>
</body>
</html>
google to figure out how to interface it with php
PcMan
05-21-2005, 12:07 AM
ok i see that, but if a member clicks Submit how do i config the code for it to conect to my database
Nightfire
05-21-2005, 09:03 AM
There's loads of login scripts out there aswell as tutorials, just a search in google brings up thousands of results
http://llimllib.f2o.org/LoginTutorial.html
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.