I've got 2 php files a master page with variables, headline, author, summary & image. And a detail page
with the variables headline author, fullstory & image.
I'm not to bothered about getting the images to load at the moment as I know its a pian.
When you click on the headline the link takes you to a detail page, were the story is displayed in full.
It all works in plain PHP, but I want it to run within a swf. What do I need to do to the php file for
flash to load the variables?
At the moment flash is loading the php file but not displaying the text, I've use:
loadVariablesNum ("test_detail.php", 0);
This is my code for the master page & the Detail page:
Master Page:-
<?php
require("../../../adodb/adodb.inc.php");
require("../../../Connections/phpnews.php");
?>
<?php
$alphaNews=$phpnews->Execute("SELECT * FROM alphabeticus") or DIE($phpnews->ErrorMsg());
$alphaNews_numRows=0;
$alphaNews__totalRows=$alphaNews->RecordCount();
?><?php
$Repeat1__numRows = 7;
$Repeat1__index= 0;
$alphaNews_numRows = $alphaNews_numRows + $Repeat1__numRows;
?>
<?php $MM_paramName = ""; ?><?php
// *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
// create the list of parameters which should not be maintained
$MM_removeList = "&index=";
if ($MM_paramName != "") $MM_removeList .= "&".strtolower($MM_paramName)."=";
$MM_keepURL="";
$MM_keepForm="";
$MM_keepBoth="";
$MM_keepNone="";
// add the URL parameters to the MM_keepURL string
reset ($HTTP_GET_VARS);
while (list ($key, $val) = each ($HTTP_GET_VARS)) {
$nextItem = "&".strtolower($key)."=";
if (!stristr($MM_removeList, $nextItem)) {
$MM_keepURL .= "&".$key."=".urlencode($val);
}
}
// add the URL parameters to the MM_keepURL string
if(isset($HTTP_POST_VARS)){
reset ($HTTP_POST_VARS);
while (list ($key, $val) = each ($HTTP_POST_VARS)) {
$nextItem = "&".strtolower($key)."=";
if (!stristr($MM_removeList, $nextItem)) {
$MM_keepForm .= "&".$key."=".urlencode($val);
}
}
}
// create the Form + URL string and remove the intial '&' from each of the strings
$MM_keepBoth = $MM_keepURL."&".$MM_keepForm;
if (strlen($MM_keepBoth) > 0) $MM_keepBoth = substr($MM_keepBoth, 1);
if (strlen($MM_keepURL) > 0) $MM_keepURL = substr($MM_keepURL, 1);
if (strlen($MM_keepForm) > 0) $MM_keepForm = substr($MM_keepForm, 1);
?>
<?php while (($Repeat1__numRows-- != 0) && (!$alphaNews->EOF))
{
?>
<A HREF="alpha_detail.php?<?php echo $MM_keepNone.(($MM_keepNone!="")?"&":"")."ID=".$alphaNews->Fields("ID")
?>"><?php echo $alphaNews->Fields("storyTitle")?></A>
<?php echo $alphaNews->Fields("storyAuthor")?>
<?php echo $alphaNews->Fields("storySummary")?>
<img src="<?php echo $alphaNews->Fields("storyImage")?>" width="120" height="150">
<?php
$Repeat1__index++;
$alphaNews->MoveNext();
}
?>
<?php
$alphaNews->Close();
?>
Detail Page:-
<?php
require("../../../adodb/adodb.inc.php");
require("../../../Connections/phpnews.php");
?>
<?php
$alphaNews__MMColParam = "1";
if (isset($HTTP_GET_VARS["ID"]))
{$alphaNews__MMColParam = $HTTP_GET_VARS["ID"];}
?>
<?php
$alphaNews=$phpnews->Execute("SELECT * FROM alphabeticus WHERE ID = " . ($alphaNews__MMColParam)
. "") or DIE($phpnews->ErrorMsg());
$alphaNews_numRows=0;
$alphaNews__totalRows=$alphaNews->RecordCount();
?>
<?php echo $alphaNews->Fields("storyTitle")?>
<?php echo $alphaNews->Fields("storyAuthor")?>
<?php echo $alphaNews->Fields("storyDate")?>
<?php echo $alphaNews->Fields("storyText")?>
<img src="<?php echo $alphaNews->Fields("storyImage")?>"
<?php
$alphaNews->Close();
?>
And also what, if any action script do I need write put in flash?
???