Hi, this is my first attempt at this but im running into problems
heres the code im using
im keep getting this error
any advice is much appreciated
Thanks
Ben
heres the code im using
Code:
<?php
include '../admin/db.php';
?>
<html>
<head><title>test</title></head>
<body>
<?php
/* grab the POST variable */
$category = $_POST['category'];
$location = 'london_se';
$query = "SELECT * FROM directory WHERE category = '$category' AND location = '$location' ";
$result = mysql_query($query)
or die ("Couldn't execute query.");
echo "<table>\n";
while ($row = mysql_fetch_assoc($result)) {
echo "<tr>
<td> $row['location'] </td>
<td> $row['category'] </td>
<td> $row['company'] </td>
<tr>\n";
}
echo "</table>\n";
?>
</body>
</html>
im keep getting this error
Code:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/godonovan/public_html/weightloss/locations/test.php on line 23
any advice is much appreciated
Thanks
Ben