Any help would be amazing. Thank you for reading this.
$current_month = time();
$newdate = strtotime('+0 month', $current_month);
$day = date('d', $newdate) ;
$month = date('m', $newdate) ;
$year = date('Y', $newdate) ;
$first_day = mktime(0,0,0,$month, 1, $year) ;
$title = date('F', $first_day) ;
$day_of_week = date('D', $first_day) ;
case "Mon": $blank = 0; break;
case "Tue": $blank = 1; break;
case "Wed": $blank = 2; break;
case "Thu": $blank = 3; break;
case "Fri": $blank = 4; break;
case "Sat": $blank = 5; break;
case "Sun": $blank = 6; break;
$days_in_month = cal_days_in_month(0, $month, $year) ;
$day_count = 1;
while ( $blank > 0 )
echo "<div class=\"spacer\">
$blank = $blank-1;
$day_num = 1;
while ( $day_num <= $days_in_month )
echo "<div class=\"number_block\">
You can't literally use JS to modify PHP code. You can however use JS to cause your html page to change by using it to make an ajax call that would execute a (background) php script that would return new data to the JS and then the JS could take that data and modify the html.
Is that what you mean?
Hi, thanks for your response.
It's kind of what I want to do. I understand what you mean regarding running a script in the background (which is what I want to do) but I need to tell the PHP to plus or minus the month it should return to the page when a button is clicked.
the js can make the php script via the ajax call with a GET parm to indicate what is to be done.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)