I am having problems running the following code:
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<head>
<title>Web Database Sample Index</title>
</head>
<body bgcolor=#ffeedd>
<h2>Data from tbl</h2>
<?php
mysql_connect() or die ("Problem connecting to database");
$query = "select * from tbl";
$result = mysql_db_query("example", $query);
if($result) {
print "Found these entries in the database:<br><p></p>";
print "<table width=90% align=center border=1><tr>";
print "<td align=center bgcolor=#00FFFF>User Name</td>";
print "<td align=center bgcolor=#00FFFF>Last Name</td>";
print "<td align=center bgcolor=#00FFFF>Domain Name</td>";
print "<td align=center bgcolor=#00FFFF>Request Date</td>";
print "</tr>";
while ($r = mysql_fetch_array($result)) {
$idx = $r["idx"];
$user = $r["UserName"];
$last = $r["LastName"];
$text = $r["FreeName"];
print "<tr>";
print "<td>$idx</td>";
print "<td>$user</td>";
print "<td>$last</td>";
print "<td>$txt</td>";
print "</tr>";
}
print "</table>";
} else {
print "No data found.";
}
mysql_free_result($result);
include('links.x);
?>
</body>
upon execution i get the following error from Apache:
Parse error: parse error in c:\web\nusphere\main\apache\htdocs\personal\index.php3 on line 49
i have looked through the code and cannot find the source of the error, i was wondering if anyone could help me in theis respect. Thanks in advance
Robin Tibbs