Jump to content

Recommended Posts

OK. I have this script, and you can post a comment. Well it's all fine except the date stamp is GMT and i am GMT -6. I can't figure out how to do this here is what is used for the script.

 

<? session_start();
require_once("include/config.php");
$lastlogin=$_SESSION['lastlogin'];
$userId=$_SESSION['user_id'];
$Commentdate=date ("M j, Y, g:i a T");
$eventID=$_POST['eventId'];
$usereventComments=$_POST['comment'];
$queryeventsrsvpcomments="Insert into userrsvpeventcomments (eventpostedid,commentsposteduserid,userrsvpcomments,commentsdatetime) values('$eventID','$userId','$usereventComments','$Commentdate')";
mysql_query($queryeventsrsvpcomments);
header("location:dsiplayeventsdetails.php?edi=$eventID");
?>

 

can anyone plz help me out I have been googling for an hour and have found no resolution

Link to comment
https://forums.phpfreaks.com/topic/67570-solved-wrong-date/
Share on other sites

where at?

 

<? session_start();
require_once("include/config.php");
$lastlogin=$_SESSION['lastlogin'];
$userId=$_SESSION['user_id'];
$Commentdate=date \3600 *-6 ("M j, Y, g:i a T");
$eventID=$_POST['eventId'];
$usereventComments=$_POST['comment'];
$queryeventsrsvpcomments="Insert into userrsvpeventcomments (eventpostedid,commentsposteduserid,userrsvpcomments,commentsdatetime) values('$eventID','$userId','$usereventComments','$Commentdate')";
mysql_query($queryeventsrsvpcomments);
header("location:dsiplayeventsdetails.php?edi=$eventID");
?>

Like that ?

Link to comment
https://forums.phpfreaks.com/topic/67570-solved-wrong-date/#findComment-339418
Share on other sites

 

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /mounted-storage/home23b/sub003/sc21754-QIFR/maasoe.com/addrsvpeventscomments.php on line 5

 

Parse error: syntax error, unexpected T_LNUMBER in /mounted-storage/home23b/sub003/sc21754-QIFR/maasoe.com/addrsvpeventscomments.php on line 5

 

is what happens when i try it like above

Link to comment
https://forums.phpfreaks.com/topic/67570-solved-wrong-date/#findComment-339420
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.