$_GET[ref];

Gestart doorDaoloth5 reacties112 weergaven

6 berichten · pagina 1 van 1

Daoloth

Lid · Topicstarter

Berichten
3.283
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hallo,

Ik heb nu:

[COLOR= #0000BB]<?php
    $referral[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ref[/COLOR][COLOR= #007700]];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"$referral"[/COLOR][COLOR= #007700];[/COLOR]
?>


Maar, ik moet hebben als iemand ?ref=blablbalbalba oproept dat dan alleen die blablbalbalba wordt opgeroepen. Als er geen ?ref=blablbalbalbal ofzo wordt opgeroepen moet hij niks weergeven.
Hoe kan ik dit doen?

Groetjes,
Marijn
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php
    $referral[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ref[/COLOR][COLOR= #007700]];[/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]$referral[/COLOR][COLOR= #007700])){[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$referral[/COLOR][COLOR= #007700];
    }[/COLOR]
?>
0
Daoloth

Lid · Topicstarter

Berichten
3.283
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Werkt niet hij geeft steeds fout op
$referral = $_GET[ref];
0
Berichten
2.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php
$referral[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ref[/COLOR][COLOR= #007700]]) ?[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ref[/COLOR][COLOR= #007700]] :[/COLOR] FALSE[COLOR= #007700];[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$referral[/COLOR] [COLOR= #007700]===[/COLOR] FALSE [COLOR= #007700]?[/COLOR] [COLOR= #DD0000][/COLOR] [COLOR= #007700]:[/COLOR] [COLOR= #0000BB]$referral[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #FF8000]// Of in 1x als je het niet perse in een var hoeft te stoppen om laten te gebruiken:[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ref[/COLOR][COLOR= #007700]]) ?[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ref[/COLOR][COLOR= #007700]] :[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700]);[/COLOR] 
?>


Ik zou het btw nog wel ff beveiligen
0
Daoloth

Lid · Topicstarter

Berichten
3.283
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dankje
0
Daoloth

Lid · Topicstarter

Berichten
3.283
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Maked
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