Chrisj Posted June 30, 2007 Share Posted June 30, 2007 I'm using script program with a Create Account Page. It asks for User Name, Password, Email Address etc., I want the User Name to be the Users Email Address, is there a way to combine these, so that the User Name is the email address? Or is it possible to somehow require that the user enter an email address as a User Name? And then store the user name where the email address would be stored? Thank you. Here is the code: <?php global $account; ?> <form method="POST" action="index.php"> <table align="center" cellpadding="1" width="70%" height="100%"> <tr><td> </td></tr> <tr><td> </td></tr> <input class='field' type='hidden' name='command' value='account'> <input class='field' type='hidden' name='param' value='signup'> <tr><td colspan='2' class='pageTitle'><div class='hLine'>Create new account</div></td></tr> <tr><td> </td></tr> <tr> <td class='fieldLabel' width="30%">Membership type</td> <td align="center">[account_type_panel]</td></tr> <tr><td> </td></tr> <tr> <td class='fieldLabel' width="30%">User Name</td> <td><input class='field' type='text' size='30' maxlength="30" name='user_name' value='<?=$account->user_name ?>'> <span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('user_name') ?></span></td> </tr> <tr> <td class='fieldLabel'>Password</td> <td><input class='field' type='password' size='30' maxlength="30" name='password' value='<?=$account->password ?>'> <span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('password') ?></span></td> </tr> <tr> <td class='fieldLabel'>Re-enter Password</td> <td><input class='field' type='password' size='30' maxlength="30" name='reenter_password' value='<?=$account->reenter_password ?>'> <span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('reenter_password') ?></span></td> </tr> <tr> <td class='fieldLabel'>Name </td> <td ><input class='field' type='text' size='40' maxlength="50" name='first_name' value='<?=$account->first_name ?>'> <span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('first_name') ?></span></td> </tr> <tr> <td class='fieldLabel'>business / company name</td> <td><input class='field' type='text' size='40' maxlength="50" name='last_name' value='<?=$account->last_name ?>'> <span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('last_name') ?></span></td> </tr> <tr><td> </td></tr> <tr> <td class='fieldLabel'>Email address</td> <td><input class='field' type='text' size='40' maxlength="50" name='email' value='<?=$account->email ?>'> <span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('email') ?></span></td> </tr> <tr> <td class='fieldLabel'>Address</td> <td><input class='field' type='text' size='40' maxlength="70" name='address' value='<?=$account->address ?>'> <span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('address') ?></span></td> </tr> <tr> <td class='fieldLabel'>Address 2</td> <td><input class='field' type='text' size='40' maxlength="70" name='address_second' value='<?=$account->address_second ?>'></td> </tr> <tr> <td class='fieldLabel'>City</td> <td><input class='field' type='text' size='40' maxlength="50" name='city' value='<?=$account->city ?>'> <span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('city') ?></span></td> </tr> <tr> <td class='fieldLabel'>Zip/Postal code</td> <td><input class='field' type='text' size='35' maxlength="35" name='zip_postal_code' value='<?=$account->zip_code ?>'> <span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('zip_code') ?></span></td> </tr> <tr> <td class='fieldLabel'>Phone Number</td> <td><input class='field' type='text' size='35' maxlength="35" name='phone' value='<?=$account->phone ?>'></td> </tr> <tr> <td class='fieldLabel'>Mobile Phone Number</td> <td><input class='field' type='text' size='35' maxlength="35" name='mobile_phone_number' value='<?=$account->mobile_phone_number ?>'></td> </tr> <tr><td> </td></tr> <tr><td> </td></tr> <tr><td colspan="2" class='hLine' align="right"> <span class='requiredField'> *</span> Required field</td></tr> <tr><td colspan='2' align="right"><input class='button' type='submit' value='create'></td></tr> <tr><td colspan="2"> </td></tr> </table> </form> Quote Link to comment https://forums.phpfreaks.com/topic/57893-making-the-user-name-an-email-address/ Share on other sites More sharing options...
Link Posted June 30, 2007 Share Posted June 30, 2007 I am not quite sure as to what you are asking, but usernames can be configured to be email addresses themselves. For instance, you can require they login with their email and password, completely eliminating the email address. Now, if that's not what you are looking for, are you trying to also create email accounts on your server for their username, or something else? Quote Link to comment https://forums.phpfreaks.com/topic/57893-making-the-user-name-an-email-address/#findComment-286874 Share on other sites More sharing options...
Chrisj Posted June 30, 2007 Author Share Posted June 30, 2007 Yes, I want to modify this script to require they login with their email and password, completely eliminating the email address. Quote Link to comment https://forums.phpfreaks.com/topic/57893-making-the-user-name-an-email-address/#findComment-286912 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.