Hi Guys,
The good news is i can display the results the bad news is i get all lots of crap around the data. E.g Array ( [0] => 4 [EventID] => 4 [1] => 3 [categoryID] => 3 [2] => educational [Eventtype] => educational [ etc.
the code that displays my data look like this
<html>
<head> </head>
<body>
<?php
$categoryID=$_POST['categoryID'];
mysql_connect("localhost","phpuser","phpuser03") or die ("Database connection error");
mysql_select_db('booking');
$sql = "SELECT * FROM event WHERE categoryID='$categoryID'";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
print_r($row);
}
?>
</body>
</html>
I have tried replacing print_r($row); with
echo "$row['EventID'], $row['categoryID']<br>\n";
but then i get the error
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\Program Files\Apache Group\Apache2\htdocs\m82\resultstest.php on line 17
Any ideas guys, i cant fix it for the life of me.