Target: Create a response page which shows result of submitting customer form.
After Submission we wish to show
order result, for that purpose we make a another below page for order proceed
result.
<html>
<head>
<title>Form Proceed</title>
</head>
<body>
<h1>Anika Stationery</h1>
<h2>Order result</h2>
<h5>Order Processed</h5>
</body>
</html>
Save as processedform.php
But html is a static language, so in that above case ( <h5>Order
Processed</h5>) always shows order proceed eithr it has done or not .
So, here we use php statement to show order result “Order
Processed”.
So instead upper code you should use
<html>
<head>
<title>Form Proceed</title>
</head>
<body>
<h1>Anika Stationery</h1>
<h2>Order result</h2>
<?php
echo "order Proceed";
?>
</body>
</html>
Now we want to add dynamic content in
program like show date and time .
So here we have to edit above php
code. (editing Shows in blue colour in below code).
<html>
<head>
<title>Form Proceed</title>
</head>
<body>
<h1>Anika Stationery</h1>
<h2>Order result</h2>
<?php
echo "order Proceed at ";
echo date("l jS \of F Y h:i:s A");
echo date("l jS \of F Y h:i:s A");
?>
</body>
</html>
Here,
H presents : 24 hour
I presents : minute with leading zero if required.
J presents: day of the month without
a leading zero
S: presents ordinal suffix(th)
F: presents full name of month.
Output:
Output:
No comments:
Post a Comment