473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

php logout time

Expand|Select|Wrap|Line Numbers
  1. <?php
  2.                                                                           if($_GET['activ_code'])
  3.                                                                           {
  4.       $time_now=mktime(date('h')+5,date('i')+30);
  5.       $a=date('h:i:s',$time_now);
  6.       echo $b=date(m."/".d."/".Y);
  7.       include("dbc.php");
  8.                                                                           $sql="update att_details set end_time='$a' where activation_code='{$_GET['activ_code']}' and date='$b'";
  9.                                                                           $res = mysql_query($sql) or die (mysql_error());
  10.  
  11.                                                                           ?>
  12.                                                  <tr>
  13.                                                    <td width="100%" height="96" align="left" valign="top" class="label"><p align="center">&nbsp;</p>
  14.                                                        <p align="center">
  15.                                                          <label></label>
  16.                                                          <label></label>
  17.                                                        </p>
  18.                                                      <p align="center">
  19.                                                          <label></label>
  20.                                                        Logout Successfully <br />
  21.                                                        </p>
  22.                                                      <p align="center"><a href="index.php"><u>Back</u></a></p>
  23.                                                      </td>
  24.                                                  </tr>
  25.                                                  <?php
  26.                                                                           }
  27.                                                                           else
  28.                                                                           {?>
  29.                                                  <tr>
  30.                                                    <td height="80" align="left" valign="top" class="label"><p align="center">
  31.                                                        <label></label>
  32.                                                      </p>
  33.                                                        <p align="center">
  34.                                                          <label></label>
  35.                                                        </p>
  36.                                                      <p align="center">
  37.                                                          <label></label>
  38.                                                        Enter correct Employee Name and Employee code!<br />
  39.                                                        </p>
  40.                                                      <p align="center"><a href="index.php"><u>Back</u></a></p>
  41.                                                    </td>
  42.                                                  </tr>
  43.                                                  <?php
  44.                                                                           }
  45.                                                                           ?>
  46.                                              </table></td>
above the query i have logout time send to database
but this is not appear my databae only 00 it coming

any one can help me

regards
AJP
Sep 11 '09 #1
5 3877
What data type you are using for end_time field ?
Sep 12 '09 #2
Dheeraj Joshi
1,123 Expert 1GB
Is time data type is used for your time field in data base?

Regards
Dheeraj Joshi
Sep 14 '09 #3
@dheerajjoshim
I am using MYSQL end_time field is time but not appear

Reagards
A. Jaya Prakash
Sep 21 '09 #4
@paulrajj
Thank your reply

I am using Mysql end_time is Timestamp but not appera pleas can u help i didnt finish that file

Regards
A. Jaya Prakash
Sep 21 '09 #5
Markus
6,050 Expert 4TB
Because MySQL doesn't like the data you're giving it. Read about the timestamp data type.
Sep 21 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Phil Powell | last post by:
class LoginSessionGenerator extends MethodGenerator { function LoginSessionGenerator() {} /** * Logout * * @access public */ function &logout() { // STATIC VOID METHOD
8
by: Harlin Seritt | last post by:
I have a remote linux server where I can only access it via ssh. I have a script that I need to have run all the time. I run like so: python script.py & It runs fine. When I log off ssh I...
6
by: somaskarthic | last post by:
Hi This is somas here. I asked query about detecting the browser close event using javascript. I want to detect the event only when the X button in the top right corner is clicked and not else...
0
by: ShailShin | last post by:
Hi All, Developing an VB App for Login and logout tracking. In App Form there are two buttons login and logout. When user click on login the loginName, LoginTime and LoginDate get stored in...
0
by: onlymukti4u | last post by:
Hi All, Can anyone help me out to get the code for knowing the login and logout time difference between some pages. What exactly I want is...."I have a small project having 5 pages,once the...
10
by: chaos | last post by:
How to do logout alert message when i press on the logout image <a href="../logout.php" target="_top" onClick="return logout()"...
5
by: camilin87 | last post by:
hello. I'm building a site using php I have a setup.php page wich has at the begining session_start(); and every single page from my site includes setup.php. When a user registers I save in...
1
by: Kandiman | last post by:
Hiya, i made a asp page, and one of my divs (as a include) is as below. the problem is if the main page is resubmitted, i get logged out again?... heres the code.. i think its on the value=true...
6
by: Thiago Macedo | last post by:
I could not find on the web a complete solution for this task. This is not the perfect solution, because it's doesn't have the ability to log the logout if browser crash or user leave it open while...
3
by: waqasahmed996 | last post by:
Hi, I want to note time when user is logout. I can note time when user login and when logout properly(use button of logout). But if user is not used button and he closed his browser or...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.