Php fout

Gestart doorWouterp2 reacties65 weergaven

3 berichten · pagina 1 van 1

Wouterp

Lid · Topicstarter

Berichten
1.631
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Heey,

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
0
Berichten
4.912
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
echo "<h4> Error: ".mysqli_error($cxn)."</h4>


zoek de verschillen xD

echo "<h4> Error: ".mysqli_error($cxn)."</h4>" ;
0
Wouterp

Lid · Topicstarter

Berichten
1.631
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
xD Dankjewel helaas licht de host er nu uit
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren