Monday, 18 November 2019

2. Processed Form


After Submisssion 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('H:i,js,F');
?>
</body>
</html>

In code echo date('H:i,js,F')
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.


No comments:

Post a Comment

Ch-16 Associate Array