Page 300 - Computer Software Application TP - Volume 1
P. 300

COMPUTER SOFTWARE APPLICATION - CITS






                 if ($_SERVER[‘REQUEST_METHOD’] == ‘POST’)
                 {
                 // Access form data using $_POST array
                 $name = $_POST[‘name’];
                 $email = $_POST[‘email’];
                 // Display a confirmation message

                 echo “Thank you, “ . $name . “ for your submission!”;
                    }

                 ?>

                       </body>
                                </html>
                 3   Save the program in C:\Apache24\htdocs in a folder with .php extension
                 4   Run the Apache services from windows services
                 5   Open the browser and type the following address

                  http://localhost/foldername/
                 6   Click the .html file to run and verify the output


















































                                                           285

                               CITS : IT & ITES - Computer Software Application - Exercise 56
   295   296   297   298   299   300   301   302   303   304   305