Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/151238-php-user-login-help/
Share on other sites

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());
?>

Link to comment
https://forums.phpfreaks.com/topic/151238-php-user-login-help/#findComment-794459
Share on other sites

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.

 

 

Link to comment
https://forums.phpfreaks.com/topic/151238-php-user-login-help/#findComment-794460
Share on other sites

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!

Link to comment
https://forums.phpfreaks.com/topic/151238-php-user-login-help/#findComment-794462
Share on other sites

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());
?>

Link to comment
https://forums.phpfreaks.com/topic/151238-php-user-login-help/#findComment-794463
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/151238-php-user-login-help/#findComment-794464
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/151238-php-user-login-help/#findComment-794472
Share on other sites

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.

 

Link to comment
https://forums.phpfreaks.com/topic/151238-php-user-login-help/#findComment-794486
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.