Hoe roep je naam op?

Gestart doorVpsje9 reacties20 weergaven

10 berichten · pagina 1 van 1

Vpsje

Lid · Topicstarter

Berichten
1.255
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Heej one2xs ers!
Hebben jullie mischien enig idee hoe je de naam oproept in PHPcode, als je ingelogd bent van Welkom Vpsje

Bijvoorbeeld.
0
Berichten
6.144
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Zo, bijvoorbeeld, moet je wel ff aanpassen naar je eigen info.

[COLOR= #0000BB]<?php
$sql[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users WHERE id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uid[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" LIMIT 1"[/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/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700])) {[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Welkom, [/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/ucfirst"]ucfirst[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]]);
}[/COLOR]
?>
0
Berichten
1.314
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Je kan ook gewoon $_SESSION[gebruikersnaam] na SELECT
Mits je met sessies werkt en deze maakt door bijvoorbeeld:
$_SESSION[gebruikersnaam] = $row[gebruikersnaamtabel];
Maar dan moet je alsnog een SELECT met $_SESSION doen^^
0
Berichten
6.356
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?
$user[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]welkom $user[/COLOR][COLOR= #007700];[/COLOR]
?>


zoiets.
of die goed zijn weet ik niet.
0
Berichten
545
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?
$user[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"welkom "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]
?>
0
Berichten
6.356
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
lijkt erop yummie
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php
$user[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Welkom [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$user[/COLOR][COLOR= #007700];[/COLOR]
?>


Nog beter pompom
0
Berichten
6.356
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php
$user[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Welkom [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700];[/COLOR]
?>


Dit is toch beter?xD
0
Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
@Mikeb, juist nietyummie
0
Berichten
6.356
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Naja boeit mij.

Ik weet met die enzo nooit xD
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