Kyron schreef:ik ben al aan het leren maar moest deze code echt super snel hebbenGa anders php leren, zonder ga je het niet redden met je eigen site... er zal maar iets veranderd moeten worden en dan moet je mensen gaan mailen...

Eleky schreef:Bedankt eleky, de punten krijg je vandaag als ik ze binnen hebAstu<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>URL Shortener</title> <link href="./style.css" rel="stylesheet" type="text/css"></link> </head> <body> [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"connect.php"[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT id, code, url, date FROM `url` ORDER BY `id` DESC "[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR]mysqk_error[COLOR= #007700]());[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]){[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<i>Er zijn nog geen links verkort</i>"[/COLOR][COLOR= #007700]; }[/COLOR] [URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR] [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700])) {[/COLOR] [COLOR= #0000BB]$id[/COLOR] [COLOR= #007700]=[/COLOR] htmlspecialchars[COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]);[/COLOR] [COLOR= #0000BB]$code[/COLOR] [COLOR= #007700]=[/COLOR] htmlspecialchars[COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]code[/COLOR][COLOR= #007700]]);[/COLOR] [COLOR= #0000BB]$url[/COLOR] [COLOR= #007700]=[/COLOR] htmlspecialchars[COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]]);[/COLOR] [COLOR= #0000BB]$date[/COLOR] [COLOR= #007700]=[/COLOR] htmlspecialchars[COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]date[/COLOR][COLOR= #007700]]);[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$id[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"<br />n"[/COLOR][COLOR= #007700];[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$code[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"</br>n"[/COLOR][COLOR= #007700];[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$date[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" n"[/COLOR][COLOR= #007700];[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"$url"[/COLOR][COLOR= #007700]; } }[/COLOR] ?> </body> </html>


rimary en a/i aangekruisd