Hij werkt nu wel:
mysqli_query($con,"INSERT INTO servers (date, title, owner, info, bannerurl, lang, ip, port, site) VALUES ($date, $title, $owner, $info, $bannerurl, $lang, $ip, $port, $site)");
toevoeging op 19 maart 2013, 09:30:40:Hoe zou ik de kolom ID automatisch kunnen laten vullen dus steeds 1 meer bij elke server die aangemaakt word
Oh, heb het al, dat heet A_I. Ik wist nooit dat het nu zo heette
toevoeging op 19 maart 2013, 10:07:32:Ik snap niet zo goed hoe ik de foutenafhandeling moet doen.
Ik heb momenteel dit:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$title[/COLOR] [COLOR= #007700]<[/COLOR] [COLOR= #DD0000]"10"[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"- De titel van je server moet minimaal 10 tekens lang zijn.<br />"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$owner[/COLOR] [COLOR= #007700]<[/COLOR] [COLOR= #DD0000]"5"[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"- Je Minecraft naam moet minimaal 5 tekens lang zijn.<br />"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$ip[/COLOR] [COLOR= #007700]<[/COLOR] [COLOR= #DD0000]"5"[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"- Het IP van je server moet minimaal 5 tekens lang zijn.<br />"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$port[/COLOR] [COLOR= #007700]<[/COLOR] [COLOR= #DD0000]"5"[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"- De poort van je server moet minimaal 5 tekens lang zijn.<br />"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$bannerurl[/COLOR] [COLOR= #007700]<[/COLOR] [COLOR= #DD0000]"10"[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"- Je banner url moet minimaal 10 tekens lang zijn.<br />"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$info[/COLOR] [COLOR= #007700]<[/COLOR] [COLOR= #DD0000]"5"[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"- De info van je server moet minimaal 100 tekens lang zijn.<br />"[/COLOR][COLOR= #007700];
}[/COLOR]
mysqli_query[COLOR= #007700]([/COLOR][COLOR= #0000BB]$con[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"INSERT INTO servers (date, title, owner, info, bannerurl, lang, ip, port, site) VALUES ($date, $title, $owner, $info, $bannerurl, $lang, $ip, $port, $site)"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Gefeliciteerd! Je server is toegevoegd."[/COLOR][COLOR= #007700];[/COLOR]
?>
Alleen geeft hij bij foute gegevens ook al die echo gefeliciteerd weer.
toevoeging op 19 maart 2013, 10
12:Ben er nu achter gekomen dat dit wel werk:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$title[/COLOR] [COLOR= #007700]<[/COLOR] [COLOR= #DD0000]"10"[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"- De titel van je server moet minimaal 10 tekens lang zijn.<br />"[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$owner[/COLOR] [COLOR= #007700]<[/COLOR] [COLOR= #DD0000]"5"[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"- Je Minecraft naam moet minimaal 5 tekens lang zijn.<br />"[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$ip[/COLOR] [COLOR= #007700]<[/COLOR] [COLOR= #DD0000]"5"[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"- Het IP van je server moet minimaal 5 tekens lang zijn.<br />"[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$port[/COLOR] [COLOR= #007700]<[/COLOR] [COLOR= #DD0000]"5"[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"- De poort van je server moet minimaal 5 tekens lang zijn.<br />"[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$bannerurl[/COLOR] [COLOR= #007700]<[/COLOR] [COLOR= #DD0000]"10"[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"- Je banner url moet minimaal 10 tekens lang zijn.<br />"[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$info[/COLOR] [COLOR= #007700]<[/COLOR] [COLOR= #DD0000]"5"[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"- De info van je server moet minimaal 100 tekens lang zijn.<br />"[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
mysqli_query[COLOR= #007700]([/COLOR][COLOR= #0000BB]$con[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"INSERT INTO servers (date, title, owner, info, bannerurl, lang, ip, port, site) VALUES ($date, $title, $owner, $info, $bannerurl, $lang, $ip, $port, $site)"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Gefeliciteerd! Je server is toegevoegd."[/COLOR][COLOR= #007700];
}}}}}}}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
?>
Alleen post hij nu lege gegevens?
toevoeging op 19 maart 2013, 10
02:O wat ben ik ook dom
Had een desc limit, het werkt dus!

!@