Hmmm, jetzt wirds richtig strange
der neue Code:
So, und nun ratet mal wie die Fehlermeldung ist
Parse error: parse error, unexpected T_STRING in /home/stud/0768047/public.www/wdk_profile/Assignments/mediaengineering/xm_db_flash/products.php on line 3
:suspekt: Zeile 3 ist nur ein Comment
der neue Code:
PHP:
<?php
// Connect to the database server
//include ("connection.php");
$hostname = "asd.asd.asd";
$database = "123123"; // your student number
$username = "123123"; // your student number
$password = "123123"; // your password
$connection = mysql_pconnect($hostname, $username, $password)
or die(mysql_error());
// Open your database
mysql_select_db($database, $connection);
// Build a SQL query
$qry = "SELECT productID, price, imagePath, description FROM xml_to_flash";
// Run the query and collect the resultset
$rs = mysql_query($qry);
// How many results are there?
$totalRows = mysql_num_rows($rs);
// first define this is an XML document
$xml = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";
// print the base node
$xml .= "<Products>\n";
// loop through the database and process the data
while ($row = mysql_fetch_array($rs)) {
// start a new product element
$xml .= "<product number='" . $row["productID"] . "' image='" . $row["imagePath"] "' . price='" . $row["price"] . "'>";
// then the element value
$xml .= $row["description"];
// and then terminate the element
$xml .= "</item>\n";
}
// terminate the base node
$xml .= "</Products>\n";
// print the XML to the output
echo $xml;
// free memory
mysql_free_result($rs);
?>
So, und nun ratet mal wie die Fehlermeldung ist
Parse error: parse error, unexpected T_STRING in /home/stud/0768047/public.www/wdk_profile/Assignments/mediaengineering/xm_db_flash/products.php on line 3
:suspekt: Zeile 3 ist nur ein Comment