Đang chuẩn bị liên kết để tải về tài liệu:
PHP and MySQL Web Development - P150
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
PHP and MySQL Web Development - P150: PHP and MySQL Web Development teaches the reader to develop dynamic, secure, commercial Web sites. Using the same accessible, popular teaching style of the first edition, this best-selling book has been updated to reflect the rapidly changing landscape of MySQL and PHP. | Solution Overview 717 Listing 30.2 Continued Congratulations img src rosette.gif alt h1 echo p Well done name with a score of score you have passed the exam. p provide links to scripts that generate the certificates echo p Please click here to download your certificate as a Microsoft Word RTF file. p echo form action rtf.php method post echo center input type image src certificate.gif border 0 center echo input type hidden name score value . score. echo input type hidden name name value . name. echo form echo p Please click here to download your certificate as a Portable Document Format PDF file. p echo form action pdf.php method post echo center input type image src certificate.gif border 0 center echo input type hidden name score value . score. echo input type hidden name name value . name . echo form echo p Please click here to download your certificate as a Portable Document Format PDF file generated with PDFLib. p echo form action pdflib.php method post echo center input type image src certificate.gif border 0 center echo input type hidden name score value . score. echo input type hidden name name value . name. echo form This script will display a message if the user did not answer all questions or scored less than our chosen pass mark. If the user successfully answered the questions he will be allowed to generate a cer-tificate.The output of a successful visit is shown in Figure 30.3. 718 Chapter 30 Generating Personalized Documents in Portable Document Format PDF Figure 30.3 score.php presents successful visitors with the option to generate a certificate in one of three ways. From here the user has three options. He can have an RTF certificate or one of two PDF certificates. We will look at the script responsible for each. Generating an RTF Certificate There is nothing to stop us from generating an RTF document by writing ASCII text to a file or a string variable but it would mean learning yet another set of syntax. Here is a very simple RTF document rtf1 .