header('Expires: Wed, 23 Dec 1980 00:30:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s ') . ' GMT');
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
header('Content-Type: text/xml');
$infoArray = '<show>';
while($row = mysql_fetch_array($result))
{
FILL OUT THE ARRAY WITH RESULTS
}
$infoArray .= '</show>';
On Thu, Oct 23, 2008 at 11:15 PM, richard_soper <[EMAIL PROTECTED]> wrote:
>
> thanks, i actually found the typo
> i forgot to close one of the prints
>
> but thanks for your reply, your input is VERY appreciated!
>
> On Oct 23, 9:31 pm, "Venkat Viswanathan" <[EMAIL PROTECTED]>
> wrote:
> > Hi,
> >
> > Add this right after <?php
> >
> > *header("Content-type: text/xml");*
> >
> > Regards,
> > Venkatwww.venkatv.com
> >
> > On Fri, Oct 24, 2008 at 8:55 AM, richard_soper <[EMAIL PROTECTED]>
> wrote:
> >
> > > Source:
> >
> > > <?php
> >
> > > mysql_connect("localhost", "username", "pass") or die(mysql_error());
> > > mysql_select_db("theboardwalk") or die(mysql_error());
> >
> > > $query = "SELECT * FROM Shows";
> > > $result = mysql_query($query);
> >
> > > print "<?xml version=\"1.0\"?>\n\n";
> > > print "<shows>\n";
> >
> > > while($row = mysql_fetch_array($result))
> > > {
> > > print "<show>\n<bands>
> > > print $row['bands'];
> > > print "</bands>\n<description>";
> > > print $row['show_desc'];
> > > print "</description>\n</show>\n\n";
> > > }
> >
> > > print "</shows>";
> >
> > > mysql_close();
> >
> > > ?>
> >
> > > I am trying to get this php file to get data from a mysql database,
> > > and output a XML sheet that can be read by FLEX
> >
> > > see anything wrong with the source?
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---