Display Date and Time in PHP

Advertisements

Include and Required in PHP Send Data From One Page to Another in PHP

Display Date and Time in PHP

Using now() function you can get current data and time and store it into database but first choose column name date and time because now() now work with date datatype.

Display today date and time on webpage using PHP

<?php

$mydate=getdate(date("U"));
echo "$mydate[weekday], $mydate[month] $mydate[mday], $mydate[year]";

?>

Live Demo

Monday, November 25, 2024

Insert today date in database

Insert system date and time in database using mysql

<?php
$sql = "insert into user(f_name, l_name, date)
      VALUES('$f_name', '$l_name', now())";

$result = mysql_query($sql);
?>

Include and Required in PHP Send Data From One Page to Another in PHP

Google Advertisment

Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 9999595223

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

For Projects 9999595223

Google Advertisements


Buy Websites 9999595223

Buy College Projects with Documentation Contact on whatsapp 9999595223. Contact on: hitesh.xc@gmail.com or 9999595223 Try this Keyword C++ Programs

Advertisements