javascript - How to show data from the generated php page to the another page?
I need some help with this problem: I have site on server which don't support php. But I want to make page with data using php and sql. And I created it. But I don't know how to show pars of variables: summ and date. My code:
<?php
require 'scripts/connect.php';
$sql_select = "SELECT * FROM zadol";
$result = mysql_query($sql_select);
$row = mysql_fetch_array($result);
do
{
printf("<p>Company: " .$row['company'] . " " .$row['summ'] ."</p>
<p>Date: " .$row['date'] . "</p>---------<br/>"
);
}
while($row = mysql_fetch_array($result));
?>
Then I want to take this variables and show on another page (without php support). How can I do this? Thanks for your help.
Answer
Solution:
The two simple options are:
Make the PHP script a webservice that you request from the 'non-php' server using an ajax call and use javascript to fill the page.
Use an iFrame in which you load the php page.