Right now my registration / login system works like
this:
1-User goes to registration page and fills out form
2-User gets to choose username but password is
autogenerated by system
3-System encrypts password in database
4-Password is unencrypted and sent along with username
to registrant's email a
something
along the lines of userid, tousergroup, activationcode).
/ rylin
-Original Message-
From: Stuart Felenstein [mailto:[EMAIL PROTECTED]
Sent: den 26 september 2004 13:46
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Question on Registration Method
Right now my registration / login sy
Currently there are only 2 types of users planned
Each has a basic access level. I don't think this is
the same as a usergroup though.
If I don't have usergroups, but access levels, then
perhaps I should set the level to some less then what
is required login till activated.
Then it sounds like
I'd do it this way...
I'd add two column in the users table. 1- activated, 2- activation-hash
once the registeration form is ubmited..
a-the username and user info will be saved in the users table.
b-an encrypted hash would be made n saved in activation-hash column
and sent along with the regist
currently i do it the same way M Saleh EG does it ;)
i have found that is the easiest way and works perfect.
> On Sun, 26 Sep 2004 16:34:16 +0400, M Saleh EG <[EMAIL PROTECTED]> wrote:
> > I'd do it this way...
> >
> > I'd add two column in the users table. 1- activated, 2- activation-hash
> >
>
Ok , I think this is along the lines of what I've
started. I added a column called "active" with a
default to 0. It's a tiny int since I'm think
0=fales, 1=true.
So can you explain a tad more about this hash stuff ?
Is that specific to a sql field or just a name you've
chose ? I'm not sure what
what i did is i used php to create a random string of numbers and
letters about 15 chars long, then i store this in the db, and in the
email i make the link page.php?code=RandomStringHere, then on the
page.php i get the code and compare it to the ont in the database. If
they match activate the use
K...I've added the 2 columns, my names - activate and
activate_hash.
Upon registration, the activate_hash has a generated
string inserted. activate column is default to 0.
I can compare it to the database - but not sure how to
flip the switch on the activate column 0->1
Is that done through an up
that is done when they click the link in thier email
if they are sent to domain.com/page.php?code=X4rfkj490T
the code in page.php will $_GET['code'] and compare it to the one in
the database, if they match, flip the switch if not show an error.
On Sun, 26 Sep 2004 06:35:59 -0700 (PDT), Stuart
Nothing like sharing my pain ;) sorry!
It seems that in order to compare the code to the one
in the database, don't I need the userid or something?
or just that it exists in the database?
Thank you,
Stuart
--- Joseph Crawford <[EMAIL PROTECTED]> wrote:
> what i did is i used php to create a rand
no you dont need a user id or anything, here is some sample code to
give you the idea
$result = mysql_query("SELECT fields FROM table WHERE code=".$_GET['code']);
if(mysql_num_rows($result) > 0) {
// we have a match, activate the account
$result1 = mysql_query("UPDATE table SET activated=1 WHE
I'm getting an error using the
"mysql_num_rows($result)"
Warning: mysql_num_rows(): supplied argument is not a
valid MySQL result resource in
/home/lurkkcom/public_html/lurktivate.php on line 7
Why am I counting the number of rows in the table?
Shouldn't I be looking to see if the code I was pas
> I'm getting an error using the
> "mysql_num_rows($result)"
> Warning: mysql_num_rows(): supplied argument is not a
> valid MySQL result resource in
> /home/lurkkcom/public_html/lurktivate.php on line 7
Did you happen to remember to change "fields" in the query string to your
table column names,
On Sunday 26 September 2004 19:45, Stuart Felenstein wrote:
> While I'm okay with mine, not completely satisfied.
> I'd like to change it to the type where like above the
> username and password is sent via email, but with the
> addition of a link in the email whereby the user must
> click on link
Unknown column 'a338265f' in 'where clause' is the
latest problem (and should be the last). I had this
same error earlier while just doing a straight sql to
the database. I corrected it then by putting
apostrophes around the column name. That didn't help
here , not quotes , maybe double apostrop
How are they any different?
I'm seeing the same thing as your method.
Stuart
--- Jason Wong <[EMAIL PROTECTED]> wrote:
> On Sunday 26 September 2004 19:45, Stuart Felenstein
> wrote:
>
> > While I'm okay with mine, not completely
> satisfied.
> > I'd like to change it to the type where like abo
Stuart... u got the logic now. check ur syntax problems urself...
this is the only way ull learn it!
a hint... if ur database query is giving u errors... try echoing it
before sending it to mysql_query. ull find out the problem yourself
then ;)
another hint... mysql_query always returns a
On Monday 27 September 2004 03:01, Stuart Felenstein wrote:
> How are they any different?
>
> I'm seeing the same thing as your method.
These two methods are separate:
> > - Send user a system generated password with which
> > they can login and
> > subsequently change.
OR
> > - Send user an ac
$_GET['activation_hash] is missing the end '
On Mon, 27 Sep 2004 03:20:22 +0800, Jason Wong <[EMAIL PROTECTED]> wrote:
> On Monday 27 September 2004 03:01, Stuart Felenstein wrote:
> > How are they any different?
> >
> > I'm seeing the same thing as your method.
>
> These two methods are separat
Well, finally suceeding to get by activation page
working, where the 0 is flipped to 1 to mean actived,
I'm stuck on the login page.
Unfortunately I'm stuck :) with what I have below.
It's part of an authentication system. This code
doesn't include the includes, but I thought maybe
significant en
20 matches
Mail list logo