I want to make a textBox where you can enter a date time and then you choose a option in a dropdown menu. The dropdown menu has a calculation.
For example:
if ($exampleMonth === 11 && $exampleDay > 30) {
$exampleMonth = 12;
$exampleDay = 1;
}
The dropdown menu is connected with my database:
require("require.php");
$oMy = new clsMYSQL();
$oMy->Query("select * IKE_EventTemplate where EventCode in ('H17', 'H18', 'H19', 'H20', 'H21')");
while(!$oMy->eof)
{
echo $oMy->row['EventCode'];;
$hFvg = $oMy->row['EventCode'];
if ($hFvg === 'H17' || $hFvg === 'H18' || $hFvg === 'H19' || $hFvg === 'H20' || $hFvg === 'H21') {
// hFdate = fs.event.eventDate;
$year = ($hFdate.getFullYear());
$month = ($hFdate.getMonth());
$day = ($hFdate.getDate());
So I make you a example.
don't exactly know what you are looking for but maybe this helps:
date_add($Date, date_interval_create_from_date_string('1 month'));//add 1 month of time to the variable $Date
you could also use date_sub()
to subtract days
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.