Skip to main content
August 13, 2006
Question

Using php my user authentication uses email address as 'user' how to change on update?

  • August 13, 2006
  • 2 replies
  • 268 views
Hi I am allowing users to update their registration details and if they use their email address as the username for login, how can I check for usernames that already exist in the database if they change it? I know the check username extension won't let you do it on an update record but people do change their usernames.
Any suggestions?
Thanks for your help.
This topic has been closed for replies.

2 replies

August 17, 2006
Hi David thanks for the reply I will try and give that a go. I have seen your book advertised but I am using Dreamweaver mx 4
Inspiring
August 13, 2006
jjjhbj111 wrote:
> Hi I am allowing users to update their registration details and if they use
> their email address as the username for login, how can I check for usernames
> that already exist in the database if they change it? I know the check username
> extension won't let you do it on an update record but people do change their
> usernames.

You need to create a recordset on the update page to check for the
username. Recordsets are automatically created at the bottom of the code
block above the DOCTYPE, so you need to cut and paste the code above the
update server behavior code, and use wrap the update SB in a conditional
statement using the value of $totalRows_recordsetName as the condition.

Chapter 10 of "Foundation PHP for Dreamweaver 8" gives detailed
instructions, but if you're reasonably competent with PHP, you should be
able to work it out from the outline I've given above.

--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/