Ja
PHP help me
Ja
Joeyl schreef:Verklaar je nader?Eerdere citaten tonen
Aarclay schreef:Ik vraag me af of het niet beter is dat de TS er beter aan doet om dit in de ijskast te schuiven, en te beginnen met een Hello World oefening.[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Dat is niet zo aardig om te zeggen..[/COLOR][COLOR= #007700];[/COLOR] ?>
Ik heb 5 jaar ervaring,. en als ik de gemaakte fouten zo zie, is dit zeker een goede tip om een bij het begin te beginnen.
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]waarschuwingp[/COLOR][COLOR= #007700]])){[/COLOR]
[COLOR= #FF8000]// COPYRIGHT MANXI
// MADE BY: JESPER[/COLOR]
[COLOR= #0000BB]$uQuerya[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users WHERE username = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uFetcheaea[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]" ORDER BY id"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$uFetcheae[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uQuerya[/COLOR][COLOR= #007700]);[/COLOR]
?>
<h2>Waarschuwingen</h2><br>
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$uFetcheae[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR] ?><br>
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$uFetcheae[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]waarschuwing[/COLOR][COLOR= #007700]];[/COLOR] ?>
<br><br> Hoe laat ik username en waarschuwing van iedereen zien en niet eentje?
While ?
[COLOR= #0000BB]<?php
$mResult[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$uResult[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$mResult[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$uQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users WHERE username = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uResult[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][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]$uQuery[/COLOR][COLOR= #007700]) >[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uFetchx[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uQuery[/COLOR][COLOR= #007700])) {[/COLOR]
?>
<h2>Waarschuwingen</h2><br>
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$uFetchx[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR] ?><br />
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$uFetchx[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]waarschuwing[/COLOR][COLOR= #007700]];[/COLOR] ?><br /><br />
[COLOR= #0000BB]<?php[/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]"Geen Leden gevonden. "[/COLOR][COLOR= #007700];
}[/COLOR]
?> Hij geeft er nog steeds maar 1 weer
WHERE username = " . mysql_real_escape_string($uResult[username]) . "
Komt omdat je daarmee 1 iemand selecteert.
Komt omdat je daarmee 1 iemand selecteert.
Hoe los je dat op?
Als dat 1 iemand selecteert, wat dacht je van weghalen?
Aarclay schreef:Hello World is anders te overdreven.Verklaar je nader?Eerdere citaten tonen
Joeyl schreef:Eerdere citaten tonen
Aarclay schreef:Ik vraag me af of het niet beter is dat de TS er beter aan doet om dit in de ijskast te schuiven, en te beginnen met een Hello World oefening.[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Dat is niet zo aardig om te zeggen..[/COLOR][COLOR= #007700];[/COLOR] ?>
Ik heb 5 jaar ervaring,. en als ik de gemaakte fouten zo zie, is dit zeker een goede tip om een bij het begin te beginnen.
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]waarschuwingp[/COLOR][COLOR= #007700]])){[/COLOR]
[COLOR= #FF8000]// COPYRIGHT MANXI
// MADE BY: JESPER[/COLOR]
[COLOR= #0000BB]$mResult[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT username FROM users"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$uResult[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$mResult[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$uQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][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]$uQuery[/COLOR][COLOR= #007700]) >[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uFetchx[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uQuery[/COLOR][COLOR= #007700])) {[/COLOR]
?>
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$uFetchx[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR] ?><br />
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$uFetchx[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]waarschuwing[/COLOR][COLOR= #007700]];[/COLOR] ?>%<br /><br />
[COLOR= #0000BB]<?php[/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]"Geen Leden gevonden. "[/COLOR][COLOR= #007700];
}[/COLOR]
?> Dat is opgelost,
Maar hoe doe ik dat er 10 resultaten op 1 pagina komt en dan maakt hij automatisch een nieuwe pagina met 10 aan net zoveel tot hij alle leden heeft geselecteerd?
dit is niet beveiligd tegen xss injecties he.
Dat doe ik altijd als laatst maar
Afbeelding niet beschikbaarDe bron kon niet worden geladen (One2xs).Bron openen ↗
Afbeelding niet beschikbaarDe bron kon niet worden geladen (One2xs).Bron openen ↗Jespar schreef:Zo vergeet je.Dat doe ik altijd als laatst maarAfbeelding niet beschikbaarDe bron kon niet worden geladen (One2xs).Bron openen ↗
Dat andere, daarvoor moet je maar eens googlen op paginaysteem. LIMIT 10, maar als je echt paginas wil das te hoog gegrepen voor jou denk ik. Dit is al 131ste reactie

[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]waarschuwingp[/COLOR][COLOR= #007700]])){[/COLOR]
[COLOR= #FF8000]// COPYRIGHT MANXI & ONE2XS
// MADE BY: JESPER & LEDEN VAN ONE2XS[/COLOR]
[COLOR= #0000BB]$page[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]&[/COLOR][COLOR= #007700]] ) ?[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]&[/COLOR][COLOR= #007700]] :[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$aantal_per_pagina[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]10[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$start[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$page[/COLOR] [COLOR= #007700]*[/COLOR] [COLOR= #0000BB]$aantal_per_pagina[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$uQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users LIMIT $start, $aantal_per_pagina"[/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]$uQuery[/COLOR][COLOR= #007700]) >[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uFetchx[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uQuery[/COLOR][COLOR= #007700])) {[/COLOR]
?>
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$uFetchx[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR] ?><br />
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$uFetchx[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]waarschuwing[/COLOR][COLOR= #007700]];[/COLOR] ?>%<br /><br />
[COLOR= #0000BB]<?php[/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]"Geen Leden gevonden. "[/COLOR][COLOR= #007700];
}[/COLOR]
?>
<a href="index.php?p=admin&waarschuwingp&[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$page[/COLOR] [COLOR= #007700]-[/COLOR] [COLOR= #0000BB]1[/COLOR] [COLOR= #007700])[/COLOR] ?>">Vorige</a><br>
<a href="index.php?p=admin&waarschuwingp&[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$page[/COLOR] [COLOR= #007700]+[/COLOR] [COLOR= #0000BB]1[/COLOR] [COLOR= #007700])[/COLOR] ?>">Volgende</a> Waar ben ik de fout in gegaan?
Ten eerste, waarom claim je dat script? Het is niet eens gemaakt door jouw.