Im new to php and will be learning in an effort to produce a slick product registration scheme for a neat litle shareware program I'm designing.
I need to know some thoughts on doing the following... Imagine you just bought my software on my website....
Customer or retailer initiates sale on e-commence. After credit card is successfully entered a PHP script needs to generate a random code within a given range and then add that number to the SQL database as a Vendor ID. It also needs to check if the Vendor ID is in the database, if it is then modify the range and generate a new code. Once successfully created this code needs to be revealed to the customer.
When the end user installs the program the executes within the program encrypt and combine customers name with bios serial number. It then reveals this scrambled code to the user as a Serial Number. The user is instructed to visit a website with an additional PHP script that will request the Serial Number and Vendor ID. The script then verifies the Vendor ID exists in the SQL database mentioned above; and if so removes that vendor ID from the SQL database and proceeds. If non-existent then and error is produced and registration is halted. The Serial Number supplied is further encrypted to some degree and possibly merged with the Vendor ID and then revealed to the customer as a Product Activation Code. The customer is then instructed to enter this in the registration area of the software.
At this point the Serial Number supplied by the customer is added to a SQL database of all registered products. If the user hardware changes, computer crashes, etc, causing the Serial Number to change and the program to ultimately to refuse the original Product Activate Code the user will have an option on website to enter the Product Activation Code supplied to them in addition to the Vendor ID. This PHP script checks entered data against the database of all previously registered products, and if it exists, then allows them to generate a new Product Activation Code using the above PHP script. Note user will only be allowed to repeat this process once in a given amount of days.
I need a PHP God and a good tutorial now. Looks like im going to be learning a new language in the next few weeks. Any critiques or suggestions.