Ticket System in PHP - #2 Generating Tickets
Submitted by Yorkiebar on Sunday, October 5, 2014 - 11:14.
Introduction:
This tutorial is a continuation from my previous tutorial in which I covered the database design and HTML password reset form scripting for this password reset ticket system.Part Two - Fake Data:
Before we can even think of making a password reset ticket system, we need to create a fake user to which we can reset their password. This series isn't on how to make a register or login form(s) and so I will simply say, go to your PHPMyAdmin, select your database, then select your 'customers' table, then go to 'Insert' and enter some fake information. I have set my fake information to: ID - blank/Na/auto increment/1 Username - Yorkiebar Password - yui Email - [email protected]Generate Random String Function:
Another short but required script or function we need for this system is a way to generate some random ticket text. This text will be used in order for the user to enter their ticket which will allow the require information be gathered therefore allowing them to reset their password via the HTML form we created in the previous tutorial, part one. This function will be named 'generateRandom'...- function generateRandom() {
- }
- $characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
- $randomString = '';
- return $randomString;
Finished!
Add new comment
- 846 views