Jump to content

Recommended Posts

i want to use php to display the session start time server side and the session start time client side. the displays are static and only need to display the times at session start. i dont want the date to appear only the times for client and server side.

 

i've searched the web to no avail and seriously contemplating smashing up my computer in frustration :)

 

please help :)

Link to comment
https://forums.phpfreaks.com/topic/140027-display-times/
Share on other sites

i have to do this as part of an assignment for uni. i thought i may have to use javascript to display the client side time and know how to do this. i make sure that a session starts when my page loads using <?php session_start();?> at the top of my page. the assignment requires me to display on the web page the time the session started server side in a format like 23:10.

 

thanks for any advice given in advance.

Link to comment
https://forums.phpfreaks.com/topic/140027-display-times/#findComment-732615
Share on other sites

thanks very much for responses, finally got it working :)

 

hopefully you can help me with another problem. i have a form that is displayed when the page is first submitted but need the form to disappear when the data is submitted. the page is self referencing any ideas?

Link to comment
https://forums.phpfreaks.com/topic/140027-display-times/#findComment-732630
Share on other sites

Either IF-Logic or put the form in a <div and use javascript to hide it depending on your needs.

 

<?php


if (isset($_POST['submit'])) {
   // do form processing
}else {
   // display the form.
}
?>

 

That would be a sample if logic. Given that your submit button name is "submit".

Link to comment
https://forums.phpfreaks.com/topic/140027-display-times/#findComment-732636
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.