Heey,
Ik ben nu bezig met php en mysql voor dummies. Ik heb de hele code keurig overgenomen maar ik krijg deze fout:
De error:
Parse error: syntax error, unexpected > in /home/goededag/domains/goededag.s3.one2xs.com/public_html/bebouwing/mysql_test.php on line 14
Er staat een verkeerde maar dat staat in me boek????
M.v.g. Wouter
Ik ben nu bezig met php en mysql voor dummies. Ik heb de hele code keurig overgenomen maar ik krijg deze fout:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<html><head><title>Mysql connectie</title></head>
<body>"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$host[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"localhost"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$user[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"test1"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$password[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"test1"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$cxn[/COLOR] [COLOR= #007700]=[/COLOR] mysqli_connect[COLOR= #007700]([/COLOR][COLOR= #0000BB]$host[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$user[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$password[/COLOR][COLOR= #007700]);
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<h4> Error: "[/COLOR][COLOR= #007700].[/COLOR]mysqli_error[COLOR= #007700]([/COLOR][COLOR= #0000BB]$cxn[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]"</h4>
}
else
{
if(mysqli_num_rows($result) < 1)
echo "[/COLOR][COLOR= #007700]<[/COLOR]p[COLOR= #007700]>[/COLOR]Kan niet verbinden met database[COLOR= #007700].<[/COLOR]/p[COLOR= #007700]>[/COLOR][COLOR= #DD0000]";
}
else
{
echo <ol>;
while($row = mysqli_fletch_row($result))
{
echo "[/COLOR][COLOR= #007700]<[/COLOR]li[COLOR= #007700]>[/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]]<[/COLOR]/li[COLOR= #007700]>[/COLOR][COLOR= #DD0000]";
}
echo "[/COLOR][COLOR= #007700]<[/COLOR]/ol[COLOR= #007700]>[/COLOR]"[COLOR= #007700];
}
}[/COLOR]
?>
</body></html> De error:
Parse error: syntax error, unexpected > in /home/goededag/domains/goededag.s3.one2xs.com/public_html/bebouwing/mysql_test.php on line 14
Er staat een verkeerde maar dat staat in me boek????
M.v.g. Wouter