Link to home
Start Free TrialLog in
Avatar of Gary Samuels
Gary SamuelsFlag for United States of America

asked on

using iframe in php

The following code works in a Wordpress page. The php variable $start_day will echo 'Aug-09-2015', the same date used in the iframe.
How do I get the iframe to work using the variable  $start_day?

 // set the default timezone to use. Available since PHP 5.1
$s = date("Y/m/d");
$time = strtotime($s);
$start = strtotime('last sunday, 12pm', $time);
$end = strtotime('next sunday, 11:59am', $time);
$format = 'M\-d\-Y';
$start_day = date($format, $start);
$end_day = date($format, $end);
header('Content-Type: text/plain');
echo "Input: $s\nOutput: $start_day - $end_day";

<iframe id="pdf" src="" frameborder="0" style="border:none; width:100%; height:900px; background: #d1d1d1;" scrolling="yes"></iframe>
<div style="height: 20px;"></div>
Avatar of Insoftservice inso
Insoftservice inso
Flag of India image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Julian Hansen
Your query is not clear.

The PHP script simply sends a date to the requesting agent.

The iframe code seems to be displaying a PDF - how are you wanting to mix these two?
Avatar of Gary Samuels


That worked, thanks