dsylebee
09-08-2009, 03:32 PM
Hi all, I was wondering if anyone could help me creating a php function which will create a timestamp using some posting values here is my code :)
seconds will always be 0
i need something like
function createTimestamp($month, $day, $year, $hour, $minute)
{
// do the cool threatment :)
return $coolTimeStamp;
}
the day will be of type "j" which means from 1-31 not including 0's.
month will be of type "n" which means from 1-12 not including 0's.
year is type "Y" which means 0000 format.
hours of type "H" not using AM PM Ex: 19h30
minutes of type "m" using 0's example 09 minutes :)
thanks in advance.
<?php
session_start();
if( isset($_SESSION["dcmsa"]) )
{
include("sql.php");
$id = $_POST["id"];
$title = $_POST["title"];
$desc = $_POST["desc"];
$month = $_POST["month"];
$day = $_POST["day"];
$year = $_POST["year"];
$hour = $_POST["hour"];
$minutes = $_POST["minutes"];
if( $id == 0 )
{
}
else
{
}
}
?>
seconds will always be 0
i need something like
function createTimestamp($month, $day, $year, $hour, $minute)
{
// do the cool threatment :)
return $coolTimeStamp;
}
the day will be of type "j" which means from 1-31 not including 0's.
month will be of type "n" which means from 1-12 not including 0's.
year is type "Y" which means 0000 format.
hours of type "H" not using AM PM Ex: 19h30
minutes of type "m" using 0's example 09 minutes :)
thanks in advance.
<?php
session_start();
if( isset($_SESSION["dcmsa"]) )
{
include("sql.php");
$id = $_POST["id"];
$title = $_POST["title"];
$desc = $_POST["desc"];
$month = $_POST["month"];
$day = $_POST["day"];
$year = $_POST["year"];
$hour = $_POST["hour"];
$minutes = $_POST["minutes"];
if( $id == 0 )
{
}
else
{
}
}
?>