Hey,
Ik ben bezig met een ledensysteem voor nlminecraft
alleen ik wil dus dat mensen spelers kunnen zoeken.
Ik heb nu dit:
Nu kunnnen ze als ze wouter0100 zoeken dit intypen:
0100
wouter
Enzovoort, Alleen bijvoorbeeld niet:
r010
out
enzovoort.
Hoe zorg ik dat dit wel kan?
Ik dacht val van elke letter splitsen enz..
maar dat is dan ook weer zo veel werk.
Iemand die hier een simpele oplossing voor weet?
Alvast bedankt!
WOuter
Ik ben bezig met een ledensysteem voor nlminecraft
alleen ik wil dus dat mensen spelers kunnen zoeken.Ik heb nu dit:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]submit[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]]))
{[/COLOR]
[COLOR= #0000BB]$zoek_query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM leden WHERE (naam LIKE "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]"% OR naam LIKE %"[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]") LIMIT 1"[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$zoek[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$zoek_query[/COLOR][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]$zoek_query[/COLOR][COLOR= #007700]) !=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]Gevonden! We versturen je door.[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]<meta http-equiv="refresh" content="3; url=http://www.nlminecraft.nl/?leden=home&mcnaam=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$zoek[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]">[/COLOR][COLOR= #007700];
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]<form action="" method="POST"><label for="naam"><b>Naam:</b></label><br/><input type="text" name="naam" id="naam"/><input type="hidden" name="leden" id="leden" value="zoek"><br/><input type="submit" name="submit" id="submit" value="Zoek!"></form>[/COLOR][COLOR= #007700];
}
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]<form action="" method="POST"><label for="naam"><b>Naam:</b></label><br/><input type="text" name="naam" id="naam"/><input type="hidden" name="leden" id="leden" value="zoek"><br/><input type="submit" name="submit" id="submit" value="Zoek!"></form>[/COLOR][COLOR= #007700];
}[/COLOR]
?> Nu kunnnen ze als ze wouter0100 zoeken dit intypen:
0100
wouter
Enzovoort, Alleen bijvoorbeeld niet:
r010
out
enzovoort.
Hoe zorg ik dat dit wel kan?
Ik dacht val van elke letter splitsen enz..
maar dat is dan ook weer zo veel werk.
Iemand die hier een simpele oplossing voor weet?
Alvast bedankt!
WOuter


