Page 299 - Computer Software Application TP - Volume 1
P. 299
COMPUTER SOFTWARE APPLICATION - CITS
</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 php file to run and verify the output
TASK 2: Acquiring user input using an HTML form
I Create an HTML Form
1 Open the text editor
2 Write the following codes
<html>
<body>
<form action=”process_form.php” method=”POST”>
Name: <input type=”text” name=”name”><br>
Email: <input type=”email” name=”email”><br>
<input type=”submit” value=”Submit”>
</form>
</body>
</html>
3 Save the program in C:\Apache24\htdocs in a folder with .html extension
II Create a PHP script that acquires user input
1 Open the text editor
2 Write the following codes
<html>
<body>
<?php
284
CITS : IT & ITES - Computer Software Application - Exercise 56