{"id":1476,"date":"2023-04-28T07:32:48","date_gmt":"2023-04-28T07:32:48","guid":{"rendered":"https:\/\/goldenoriole.in\/?page_id=1476"},"modified":"2023-04-28T08:13:30","modified_gmt":"2023-04-28T08:13:30","slug":"calculator-2","status":"publish","type":"page","link":"https:\/\/goldenoriole.in\/index.php\/calculator-2\/","title":{"rendered":"Calculator"},"content":{"rendered":"<h1><pre id=\"code-snippet-source-0\" class=\"code-snippet-source\"><code class=\"language-php\">&lt;?php\n\n<\/code><\/pre><\/h1>\n<h1><\/h1>\n<h1><!--?php &lt;br ?--> Age Calculator<\/h1>\n<form action=\"&lt;?php echo htmlspecialchars($_SERVER[\" method=\"post\">&#8220;&gt;<br \/>\n<label for=\"dob\">Enter your date of birth:<\/label><br \/>\n<input id=\"dob\" name=\"dob\" type=\"date\" \/><input type=\"submit\" value=\"Calculate\" \/><\/form>\n<p><!--?php \/\/ Check if form is submitted if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") { $dob = $_POST[\"dob\"]; \/\/ Calculate age based on date of birth $birthdate = new DateTime($dob); $today = new DateTime(); $age = $birthdate-&gt;diff($today)-&gt;y;&lt;\/p&gt; &lt;p&gt; \/\/ Display result&lt;br ?--> echo &#8220;You are &#8221; . $age . &#8221; years old.&#8221;;<br \/>\n}<br \/>\n?&gt;<br \/>\n?&gt;<br \/>\n?&gt;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Age Calculator &#8220;&gt; Enter your date of birth: echo &#8220;You are &#8221; . $age . &#8221; years old.&#8221;; } ?&gt; ?&gt; ?&gt;<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-1476","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/goldenoriole.in\/index.php\/wp-json\/wp\/v2\/pages\/1476","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/goldenoriole.in\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/goldenoriole.in\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/goldenoriole.in\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/goldenoriole.in\/index.php\/wp-json\/wp\/v2\/comments?post=1476"}],"version-history":[{"count":14,"href":"https:\/\/goldenoriole.in\/index.php\/wp-json\/wp\/v2\/pages\/1476\/revisions"}],"predecessor-version":[{"id":1490,"href":"https:\/\/goldenoriole.in\/index.php\/wp-json\/wp\/v2\/pages\/1476\/revisions\/1490"}],"wp:attachment":[{"href":"https:\/\/goldenoriole.in\/index.php\/wp-json\/wp\/v2\/media?parent=1476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}