Hi, I want to output a mysql table cutomers as xml.
What am I doing wrong. For this example i am using two fields.
<?php require_once('Connections/conn_members.php'); ?>
<?php
//this line selects all from the table customers
$result = mysql_query("SELECT * FROM customers");
// And now we need to output an XML document
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<customers>';
echo '<label>';
echo '<brides_fullname="Brides Name" />';
echo '<grooms_fullname="grooms_name" />';
//this is a loop that will fetch all entries
while($row=mysql_fetch_array($result)){
$line = '<brides_name="'.$row[brides_fullname].'"/>';
$line = '<brides_name="'.$row[grooms_fullname].'"/>';
echo $line;
}
echo '</label>';
echo '</customers>';
?>
What am I doing wrong. For this example i am using two fields.
<?php require_once('Connections/conn_members.php'); ?>
<?php
//this line selects all from the table customers
$result = mysql_query("SELECT * FROM customers");
// And now we need to output an XML document
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<customers>';
echo '<label>';
echo '<brides_fullname="Brides Name" />';
echo '<grooms_fullname="grooms_name" />';
//this is a loop that will fetch all entries
while($row=mysql_fetch_array($result)){
$line = '<brides_name="'.$row[brides_fullname].'"/>';
$line = '<brides_name="'.$row[grooms_fullname].'"/>';
echo $line;
}
echo '</label>';
echo '</customers>';
?>