%gebruikersnaam%

Gestart doorMarvinn19 reacties48 weergaven

20 berichten · pagina 2 van 2

Berichten
2.692
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Jou manier moet je elke keer toepassen..
Die van mij zet je neer en hij filtert alles over de hele pagina ;p
0
Berichten
6.144
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Robbert schreef:
Eerdere citaten tonen
Smiegles schreef:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]inc/config.php[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$naam[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]Bas[/COLOR]
[COLOR= #007700]function[/COLOR] handler[COLOR= #007700]([/COLOR][COLOR= #0000BB]$str[/COLOR][COLOR= #007700]){[/COLOR]
[URL="http://www.php.net/global"]global[/URL] [COLOR= #0000BB]$naam[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$str[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]%gebruikersnaam%[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$naam[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$str[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$str[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/ob_start"]ob_start[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]handler[/COLOR][COLOR= #007700]);[/COLOR]
?>
hier het hele script met
hoi %gebruikersnaam%!
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/ob_end_flush"]ob_end_flush[/URL][COLOR= #007700]();[/COLOR]
?>
hij weergeeft Bas niet?
hier het hele script met hoi !
staat er dan
$naam hoort volgensmij binnen de function te staan.

Hoeft niet, maar dan moet je $naam instellen als global.

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]inc/config.php[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$naam[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]Bas[/COLOR]
[COLOR= #007700]function[/COLOR] handler[COLOR= #007700]([/COLOR][COLOR= #0000BB]$str[/COLOR][COLOR= #007700]){[/COLOR]
[URL="http://www.php.net/global"]global[/URL] [COLOR= #0000BB]$naam[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$str[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]%gebruikersnaam%[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$naam[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$str[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$str[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/ob_start"]ob_start[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]handler[/COLOR][COLOR= #007700]);[/COLOR]
?>
hier het hele script met
hoi %gebruikersnaam%!
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/ob_end_flush"]ob_end_flush[/URL][COLOR= #007700]();[/COLOR]
?>
0
Marvinn

Lid · Topicstarter

Berichten
2.609
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik gebruik
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]function[/COLOR] handler[COLOR= #007700]([/COLOR][COLOR= #0000BB]$str[/COLOR][COLOR= #007700]){[/COLOR]
[COLOR= #0000BB]$naam[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR]gebruikersnaam[COLOR= #007700]].[/COLOR][COLOR= #DD0000][/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$str[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]%gebruikersnaam%[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$naam[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$str[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$str[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/ob_start"]ob_start[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]handler[/COLOR][COLOR= #007700]);[/COLOR]
?>
hoi %gebruikersnaam%!
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/ob_end_flush"]ob_end_flush[/URL][COLOR= #007700]();[/COLOR]
?>


Werkt prima smile
0
Berichten
1.115
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Of je maakt bijv 2 .php bestandjes bij de ene schrijf je

$naam = "Hoooooi jouwnaam";
?>

En bij de andere include je die php pagina en doe je

yummie
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Mybot schreef:
Of je maakt bijv 2 .php bestandjes bij de ene schrijf je

$naam = "Hoooooi jouwnaam";
?>

En bij de andere include je die php pagina en doe je

yummie
Dat heeft er totaal niks mee te maken. clown
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