.Htaccess/PHP Vraag

Gestart doorAllard2 reacties26 weergaven

3 berichten · pagina 1 van 1

Allard

Lid · Topicstarter

Berichten
970
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Beste,

Ik heb een pagina comments.php. Maar ik wil dat als je naar comments.php gaat, je word doorgestuurd. Of dat er een melding komt te staan. Maar dat als je naar comments.php?vid=blablabla gaat, dat je niet word door doorgestuurd. Hieronder zie je een schema. Kan dit allses via .Htaccess of met PHP?

comments.php > Melding
comments.php?vid= > Melding
comments.php?vid=bla > Geen melding
0
Berichten
515
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Kan met php.

[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]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]vid[/COLOR][COLOR= #007700]])) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]geen video meegegeven[/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]vid[/COLOR][COLOR= #007700]]) &&[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]vid[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000][/COLOR] [COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Geen video meegegeven[/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]vid[/COLOR][COLOR= #007700]]) &&[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]vid[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700]) {[/COLOR]
[COLOR= #FF8000]//rest van script[/COLOR]
[COLOR= #007700]}[/COLOR]
?>


dit is puur voorbeeld kunnen altijd foutjes in zitten
0
Allard

Lid · Topicstarter

Berichten
970
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dank je. Maar?

Parse error: syntax error, unexpected { in /home/allard/domains/.../public_html/index3.php on line 2


UPDATE: Laat maar, hij werkt al. Nice!
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