Registering HyperMaker Ebooks Online
When an user wants to register an Ebook locked by a password, you can either provide him with the proper password, so he can unlock the Ebook or give him a link to your website, where an script will generate the password automatically.
In both ways, the information can be sent by placing a submission form in an Ebook page with some hidden fields. Your reader will have to write the name he wants to use to register the Ebook and click the Send button, the Ebook will add automatically such information as: Publication Title and I.D. number.
To configure the form can send all the information (either by email or to an online script), the only thing required is to place some hidden fields inside the submission form.
<FORM METHOD="POST" ACTION="http://mywebsite/cgi-sys/form.cgi" ENCTYPE="x-www-form-urlencoded"> <p>User Name: <INPUT TYPE="text" NAME="UserName" SIZE="20"></p> <p>I.D. number: <!--#ID--></p> <INPUT TYPE="hidden" NAME="PublicationTitle" VALUE="<!--#PT-->"> <INPUT TYPE="hidden" NAME="IDNumber" VALUE="<!--#ID-->"> <INPUT TYPE="reset" NAME="Reset" VALUE="Reset"> <INPUT TYPE="submit" NAME="Submit" VALUE="Submit"> </FORM>
ACTION method
may point to a CGI to E-Mail (to send email) or FormMail gateway (to communicate with a script).
The code above marked in red <!--#ID--> and <!--#PT--> are pseudotags that will be replaced with the I.D. key and the Publication title automatically (please see INCLUDE tag).
<!--#ID--> appears twice in the above example because it is needed both to show the I.D. number to the user and to send it to the online script.
After receiving the submission, the CGI to E-Mail or FormMail gateway should direct the Ebook or the browser to the next page, allowing an online payment for the publication.
If you want the default Internet browser to handle the online communication instead the Ebook, add in the form another hidden field, called USE_BROWSER. Example:
<INPUT TYPE="hidden" NAME="USE_BROWSER">
This field does not required a value.
To see more options set by using hidden fields, please read Using Forms.
If you submit the Form using the Ebook, it will process automatically the data sent back by the script and the user can register the Ebook with just a click more.
If you use the Internet Browser to handle the communication, you user will need to copy the registration key from the Internet browser page and paste it in the Ebook to register it.
If the script was called and handled by the Ebook it always should generate a registration form, which is a form intended for entering the Publication Title. I.D. number and User name, and to unlock the Ebook when it is submitted, provided that the password is correct.
The script can include all the required information, User name, Publication Title and I.D. number, in the form that it generates, so the user doesn't need to fill anything, but only have to click the submission button to register the Ebook.
If the script was called by the Internet browser, it will simply show in screen the registration key, so the user can copy and then paste it in the Ebook registration form.
Scripts for generating Ebook passwords are only provided to people who purchased HyperMaker
See also Online form submission and Generating registration keys online with a CGI script