Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PHP login system for AtosoftQB
#11
its just the principle of it. You encrypt passwords, thats just how it is.
url=http://www.copy-pasta.com]CopyPasta[/url] - FilePasta
Reply
#12
I have encrypted the password stuff now, using md5()

Oz~
Reply
#13
Good.

So does it work?
url=http://www.copy-pasta.com]CopyPasta[/url] - FilePasta
Reply
#14
here are teh feilds:

Code:
$query="CREATE TABLE userdata (id INT(6) auto_increment,name VARCHAR(32) NOT NULL,password varchar(32) NOT NULL,email VARCHAR(64) NOT NULL,signature TEXT,posts INT,rank INT,PRIMARY KEY (id))";

mysql_query($query);

and the register:

Code:
$query = "INSERT INTO userdata VALUES ('','$username','password','$email','$sig','$posts','$rank')";
mysql_query($query);

$result = mysql_db_query ("****", $query);

if ($result){
echo "User successfully created! <br> Please login to continue";
}
else {
echo mysql_errno().": ".mysql_error()."<BR>";
}

mysql_close ();

still a bug in here sumwhere.....teh user&pass for teh database checks out...

Oz~
Reply
#15
$query = "INSERT INTO userdata VALUES (
'',
'$username',
'password',
'$email',
'$sig',
'$posts',
'$rank')";

Encrypt $password however you do it,
Change password to $password,
which will insert the encrypted $password
into the password field of your table.

You really ought to consider using complete
INSERTS, eg. -

$query = "INSERT INTO userdata SET
username = '$username',
password = '$password',
email = '$email',
signature = '$sig',
posts = '$posts',
rank = '$rank'";

This would make the table and its PHP
easier to update and understand visually.
ammit potato!
Reply
#16
wowza!

thanks a million.....i'll use that format - does look easier.....im completely new to PHP, since last week, so i'd say im doing pretty well for nube

Well, i'll fix all that, and get this thing running!

Oz~
Reply
#17
hmmmm........not teh problem.......there is sumthing on line "17"

heres the full code:
Code:
<HTML>

<HEAD>
  <TITLE>AtosoftQb Homepage</TITLE>
</HEAD>

<BODY bgcolor="White" text="Black" link="#004080" vlink="#004080" alink="#004080">

<?

require("header.htm");

$username=$_POST['duser'];
$email=$_POST['email'];
$password=$_POST['pswrd'];
$rank=0
$posts=0

$conn = mysql_connect(localhost , **** , ****);

if ($conn == false)
{
echo mysql_errno() . ": " . mysql_error() . "<BR>";
exit;
}

@mysql_select_db("****") or die( "Unable to select database");

$pasword=md5($password)

$query = "INSERT INTO userdata SET username='$username',password='$password',email='$email',signature='$sig',posts='$posts',rank='$rank'";

$result = mysql_db_query ("****", $query);

if ($result){
echo "User successfully created! <br> Please login to continue";
}
else {
echo mysql_errno().": ".mysql_error()."<BR>";
}

mysql_close ();

Require("footer.htm");

?>

</BODY>
</HTML>

Oz~
Reply
#18
Looks like missing semicolons ";" after $ranks and $posts.
Reply
#19
It works!!!!!!!!

Woohooooooooooooooooooo!

No one register, please....i have to do sume more things on my admin panel, now that i know how, and then, i'll open the site to the public

BTW: www.atosoftqb.digitalblackie.com/members.php

Oz~
Reply
#20
Quote:Looks like missing semicolons ";" after $ranks and $posts.

THE HORROR
ammit potato!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)