energysuperstore09 Posted March 26, 2009 Share Posted March 26, 2009 I am new to php and I am wanting to make a login to where users can go and register for a username and password. I know a little and i made a login where i gave the user a username and password but I am having trouble making it where each user can register for there own username and password. Can anybody help me get on the right track? Thanks for the help! Here is the login that I made where I assigned a username and password to login in. http://www.texasfluorescents.com/distributorlogin.html Quote Link to comment https://forums.phpfreaks.com/topic/151238-php-user-login-help/ Share on other sites More sharing options...
redarrow Posted March 26, 2009 Share Posted March 26, 2009 is the database set up correctly, and the id is auto_increment? Quote Link to comment https://forums.phpfreaks.com/topic/151238-php-user-login-help/#findComment-794457 Share on other sites More sharing options...
redarrow Posted March 26, 2009 Share Posted March 26, 2009 example <?php $sql3="CREATE TABLE user_logon( user_logon_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, username VARCHAR(100) NOT NULL, password VARCHAR(50) NOT NULL, email VARCHAR(100) NOT NULL, secret_word VARCHAR(100) NOT NULL, account_activated ENUM('yes','no') DEFAULT 'no' NOT NULL, date INT(50) NOT NULL )"; $sql3=mysql_query($sql3)or die("Create table user_logon error\n".mysql_error()); ?> Quote Link to comment https://forums.phpfreaks.com/topic/151238-php-user-login-help/#findComment-794459 Share on other sites More sharing options...
energysuperstore09 Posted March 26, 2009 Author Share Posted March 26, 2009 The database is set up correctly I believe. I figured out how to create the login and the database to support it, but i want to be more advanced such as users registering for there own username and password. I simply created the database and with username and password where I assigned username a value "txfluorescent" and password a value "info" and gave this information to the user where they enter the value and it brings up the info that they need. There are thousands of users that all need to access different information so they need there own username and password to access there info. Quote Link to comment https://forums.phpfreaks.com/topic/151238-php-user-login-help/#findComment-794460 Share on other sites More sharing options...
energysuperstore09 Posted March 26, 2009 Author Share Posted March 26, 2009 So I enter this query into the database? How would the php script look for the login form? Sorry I am new to this php and it is kicking my butt. Can you give me an example how the php script would look? Thanks alot! Quote Link to comment https://forums.phpfreaks.com/topic/151238-php-user-login-help/#findComment-794462 Share on other sites More sharing options...
redarrow Posted March 26, 2009 Share Posted March 26, 2009 dont get it have you just found php, as you got so many users that strange. <form method="POST" action=" "> Please add a username: <br> <input type="text" name="username"> <br><br> Please add a password: <br> <input type="password" name="password"> <br><br> Please add a valid email: <br> <input type="text" name="email"> <br><br> Add secret number/word <br> <input type="text" name="secret_word"> <br><br> </form> <?php $sql3="CREATE TABLE user_logon( user_logon_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, username VARCHAR(100) NOT NULL, password VARCHAR(50) NOT NULL, email VARCHAR(100) NOT NULL, secret_word VARCHAR(100) NOT NULL, date INT(50) NOT NULL )"; $sql3=mysql_query($sql3)or die("Create table user_logon error\n".mysql_error()); ?> Quote Link to comment https://forums.phpfreaks.com/topic/151238-php-user-login-help/#findComment-794463 Share on other sites More sharing options...
energysuperstore09 Posted March 26, 2009 Author Share Posted March 26, 2009 I have been playaround with it and I have been going online trying to figure it out and for some reason I am having trouble. I was asked by my boss to create a login so that our distributors can access special pricing and information regarding thier account. So I to create the login where i assigned the username and password. But there are many distributors and they all have different pricing. For some reason I am having trouble learning this PHP script. I am taking classes on MYSQL Server 2005 so the database side is starting to make more sense but the php aspect of it is still really difficult for me. Quote Link to comment https://forums.phpfreaks.com/topic/151238-php-user-login-help/#findComment-794464 Share on other sites More sharing options...
redarrow Posted March 26, 2009 Share Posted March 26, 2009 What your have to do is create a web site that explains, what type off user they are, Then get them to select what they are from a select box, insert that into a database table with username and password and date , and only let them access the page that there suppose to be. is that what you mean. Quote Link to comment https://forums.phpfreaks.com/topic/151238-php-user-login-help/#findComment-794472 Share on other sites More sharing options...
energysuperstore09 Posted March 26, 2009 Author Share Posted March 26, 2009 Not really because there all distributors selling the same products. The only difference would maybe certain types of information regarding there account with us and pricing would be different for eas distributor. I want them to go to our distributor page then register for a login username and password so that they can have access to special pricing and important information regarding there account. I would need to know there Rep Id # - They all have a rep number assigned by us First Name Last Name Company Name Phone Number Email Address Then I would like them to select a username then a password then verify password then if possilble a secret question and answer so that they can retrieve there login if forgotten. In know I am asking alot but maybe you can help me? I would appreciate any help at this point as I am in need in getting this done. Thanks alot in advance. Quote Link to comment https://forums.phpfreaks.com/topic/151238-php-user-login-help/#findComment-794486 Share on other sites More sharing options...
energysuperstore09 Posted March 26, 2009 Author Share Posted March 26, 2009 Can anybody help me? ??? Quote Link to comment https://forums.phpfreaks.com/topic/151238-php-user-login-help/#findComment-794502 Share on other sites More sharing options...
energysuperstore09 Posted March 26, 2009 Author Share Posted March 26, 2009 Is there anubody that can guide me through this php login? I am new to this and could use advice. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/151238-php-user-login-help/#findComment-794565 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.