Hi Harish,
To assign the value of the email field to the username field, you would have to use javascript.
It would be something like:
(i havent tested the js)
(you will have to change formname to the name of your form.)
However...
You do not need to have the hidden field for the username. If it is the same as the email, then on the php script that handles the form, you can just use the email as if its the username.
In reality however, you really dont need to have a username field in your database, if it is the same as the email address. It is only redundant and takes up more space in your database... One of the good rules of creating a database is to remove redundancy, yet at the same time keep every row in the database unique. This is already achieved by a unique email address. It is still better even if you have an id for each row, that auto increments.
cheers...
digital-ether
Nearly a Posting Virtuoso
1,293 posts since Sep 2005
Reputation Points: 461
Solved Threads: 101