|
||||||
| PHP Forum Use this forum to discuss all aspects of PHP Development. PHP is a server-side, cross-platform, HTML embedded scripting language that lets you create dynamic web pages. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Random password generation
I want to generate password randomly and send to mysql database using PHP..i have got the following function for generating password but doesn't know how to incorporate in my registration form and where to call that function and update password field in database..please help me..
PHP Code:
|
|
||||
|
Re: Random password generation
In order for us to answer we will need to know a bit more about your registration form. Do you allow your user to enter the password or do you always want a generated password?
__________________
Questions and Answers | Online News and Social Bookmarking | Code and Text Collaboration General Chat Forum |
|
||||
|
Re: Random password generation
If you are always generating a password you should just have to call that function.
Can you show us the registration page?
__________________
![]() Google - I'm Feeling Lucky | Youtube Classes! My Portfolio | Email Me | QuestionBin |
|
|||
|
Re: Random password generation
I am not allowing the user to enter the password.i want to generate it and send it to user's email.my registration form is:
Code:
<form name="account" method="post"> <div><h2>User Account</h2></div> <fieldset><legend><b>Account Information</b></legend> <div>Username<span style="color:#FF0000;">*</span></div> <div><input type="text" name="un" id="un" style="width:300px;" /></div> <div style="font-size:11px;">Spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores.</div> <div>E-mail Address<span style="color:#FF0000;">*</span></div> <div><input type="text" name="email" id="email" style="width:300px;" /></div> <div style="font-size:11px;">A valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.</div> </fieldset> <fieldset><legend><b>Personal Information</b></legend> <div>First Name<span style="color:#FF0000;">*</span></div> <div><input type="text" name="fn" id="fn" style="width:300px;"/></div> <div>Last Name<span style="color:#FF0000;">*</span></div> <div><input type="text" name="ln" id="ln" style="width:300px;" /></div> <div style="font-size:11px;">The content of this field is kept private and will not be shown publicly.</div> <div>Company Name</div> <div><input type="text" name="cn" id="cn" style="width:300px;"/></div> <div>Street Address<span style="color:#FF0000;">*</span></div> <div><input type="text" name="add" id="add" style="width:300px;" /></div> <div style="font-size:11px;">The content of this field is kept private and will not be shown publicly.</div> <div>City<span style="color:#FF0000;">*</span></div> <div><input type="text" name="cty" id="cty" style="width:300px;" /></div> <div>State<span style="color:#FF0000;">*</span></div> <div><input type="text" name="state" id="state" style="width:300px;" /></div> <div>Postal Code<span style="color:#FF0000;">*</span></div> <div><input type="text" name="pin" id="pin" style="width:300px;" /></div> <div style="font-size:11px;">The content of this field is kept private and will not be shown publicly.</div> <div>Phone Number<span style="color:#FF0000;">*</span></div> <div><input type="text" name="phone" id="phone" style="width:300px;" /></div> <div style="font-size:11px;">The content of this field is kept private and will not be shown publicly.</div> </fieldset> <div><input type="submit" name="submit" id="submit" value="Create New Account" /></div> </form> |
|
||||
|
Re: Random password generation
Have you written any PHP code besides that function?
__________________
![]() Google - I'm Feeling Lucky | Youtube Classes! My Portfolio | Email Me | QuestionBin |
|
|||
|
Re: Random password generation
i have written the insert query as follows:
PHP Code:
Last edited by WingedPanther; 06-17-2009 at 11:41 AM.. Reason: add code tags (the PHP sheet) |
|
|||
|
Re: Random password generation
hey thanks for all ur efforts...i have written that function in other php file and included it in the current registration file as follows:
$pw=generatePassword(8); and inserted $pw in against the password field... |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Password Program | dejongajongjong | Pascal/Delphi | 7 | 01-07-2010 02:10 PM |
| Random generation of string, towards goal result | Bishop | General Programming | 3 | 11-09-2008 07:39 PM |
| Encryption using Random!? | TcM | Programming Theory | 14 | 01-07-2008 11:48 AM |
| Random Map Generation | chax | Perl | 3 | 09-03-2007 09:58 PM |
| Forgot Your Password On XP? | pranky | Tutorials | 12 | 04-26-2007 10:08 AM |
All times are GMT -5. The time now is 08:16 AM.
Amrosama.cc
Arekbulski.cc
Debtboy.cc
Guest.cc
Jaan.cc
James.cc
Mathx.cc
Tsz.cc
Vswe.cc