hello,
i have this code.
<?php
$link = mysql_connect('localhost', 'root', 'password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_select_db("ebay");
$query = "SELECT * FROM Auctions";
$result = mysql_query($query) or die(mysql_error());
$records = array();
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
$records[] = $row;
}
echo"<table>"
foreach($records as $row}
{
echo"<tr>"
echo"<td><a href="view_record.php?num="echo $row['Article Number']">echo $row['Article Number']</a></td>"
echo"<td>echo $row['Article Name']</td>"
echo"</tr>"
echo"</table>"
mysql_close($link);
?>
In which I am trying to echo a table, but get this error:
Parse error: syntax error, unexpected T_FOREACH, expecting ',' or ';' in C:\Programme\EasyPHP 2.0b1\www\test.php on line 25
What have I missed?
Also, I know that this is quite a big project, but I am not completely new to programming, as I did java for a good few years, I am just extremely rusty, and having to work on my actual job while trying to do this, so this website is a godsend.
EDIT: Thankyou for your help. I am using Marks repaired version, however I get this error:
Notice: Undefined index: Article Number in test.php on line 29
I plan on studying over the manual when I have some more time, and I didnot give out my real username or password, geheim just means secret in german.