Jump to content

Convert date to string


IgnaceV
Go to solution Solved by IgnaceV,

Recommended Posts

Ik have a database table "abbonees" (MariaDB) where I have among some textfields, following fields
date (current_timestamp on time of registration), type date
time ((current_timestamp on time of registration) type time
end date (date + 7 days) type date 
end time ( time + 2 hours)  type time
When I use this code

if ($_SESSION['pasw'] == $row["paswoord"]){
		$_SESSION['ingelogd']="J";
		$_SESSION['Naam']= $row["Naam"];
		$_SESSION['VNaam']= $row["Vnaam"];
		$_SESSION['edat']= $row["einddatum"];

When I try to login, Then I get this error: Warning: Undefined array key "einddatum" in /customers/1/5/0/fv-vl-ardennen.be/httpd.www/koepel/inlog.php on line 30 Warning: Cannot modify header information - headers already sent by (output started at /customers/1/5/0/fv-vl-ardennen.be/httpd.www/koepel/inlog.php:30) in /customers/1/5/0/fv-vl-ardennen.be/httpd.www/koepel/inlog.php on line 32
The first 3 are OK.
What do I wrong?

Edited by IgnaceV
Link to comment
Share on other sites

  • Solution

I think that I know what I am doing wrong.

Array ( [IDR] => 5 [Naam] => Tester [Vnaam] => twee [mail] => service@ipathome.be [paswoord] => 314cfc36688da0847e6cbf7fe2961c96 )

Warning: Cannot modify header information - headers already sent by (output started at /customers/1/5/0/fv-vl-ardennen.be/httpd.www/koepel/inlog.php:30) in /customers/1/5/0/fv-vl-ardennen.be/httpd.www/koepel/inlog.php on line 32

I must extend my query.

Link to comment
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.