Hey there, I have a PHP file, an SWF and an XML which contains all the information to go into the PHP.
The XML is as follows:
<polls>
<poll title="Who do you think should win Pop Icons 2009?">
<answers>
<answer>
<name>Michael</name>
<tally>0</tally> <image>www.clipart.com/test1.jpg</image>
<flash>songs/1.swf</flash>
</answer>
<answer>
<name>George</name>
<tally>0</tally> <image>www.clipart.com/test2.jpg</image>
<flash>songs/2.swf</flash>
</answer>
So far the PHP code has been working correctly to display a different name and image in each cell in a table. However, when I’ve tried to insert the code for flash I get nothing now! Here is what I have so far, can anybody see what could be wrong with just the flash part to make the whole thing stop working? Here is the PHP code I have including the non-working flash part on the last few lines…
for ($i = 0; $i < 4; $i++) {
echo "<td>";
echo "<input type=\"radio\" name=\"vote\" value=\"" . $polls->poll[$pid]->answers->answer[$i]->name . "\" />" . $polls->poll[$pid]->answers->answer[$i]->name.
(isset($polls->poll[$pid]->answers->answer[$i]->image)?
'<br/><img src="' . $polls->poll[$pid]->answers->answer[$i]->image . '">'
:'').
(isset($polls->poll[$pid]->answers->answer[$i]->flash)?
'<br/><object width="100" height="30">'
'<br/><param name="movie" value="'
. $polls->poll[$pid]->answers->answer[$i]->flash . '">'
'<br/><embed src="' . $polls->poll[$pid]->answers->answer[$i]->flash . '">'
'<br/></embed>'
'<br/></object>'
:'').
"
";
}
}
I think I’m nearly there and it’s just a simple mistake but I can’t work it out!
Thanks a lot
Chris