This is PHP Using cookies – can you add to the “You have logged on” line above to state (on the next line); “Your last l

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

This is PHP Using cookies – can you add to the “You have logged on” line above to state (on the next line); “Your last l

Post by answerhappygod »

This is PHP
Using cookies – can you add to the “You have logged on” lineabove to state (on the next line); “Your last login was: “ withdate and time.
If I want to add my last login's data and time, whichcode should I have to use?
(After print '<p>You have logged at:<b>'~)
<?php //Obtain Session Information session_start(); //This is the specials file define('TITLE', 'Our Menu'); //Include the header.html template include('templates/header.html'); ?> <h1>Pizza Menu</h1><?php //Set timezone date_default_timezone_set('America/Toronto'); print '<p><b>Hello, ' .$_SESSION['email'] . '!</b></p>'; print '<p>You have logged at: <b>' .date('g:i a', $_SESSION['loggedin']) .'</b></p>';?> <p>Choose from our outstanding menubelow!</p> <table> <tr><td> <h3>Alternative Meat Pizza - $14.99</h3> <ul> <b>Toppingsincluded:</b> <li>Elk</li> <li>Alligator</li> <li>Snake</li> <li>Boar Bacon</li> </ul> </td><td> <imgsrc="images/alternative_pizza.png" alt="" /> </td></tr> <tr><td> <h3>Fruitarian Pizza - $24.99</h3> <ul> <b>Toppingsincluded:</b> <li>Bananas</li> <li>Kiwi</li> <li>Blueberries</li> <li>Strawberries</li> </ul> </td><td> <imgsrc="images/fruit_pizza.png" alt="" /> </td></tr> </table><?php //Logout link print '<p><ahref="logout.php">Logout</a></p>'; //Include the footer.html template include('templates/footer.html');?>
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply