PHP hulp

Gestart doorDexter6 reacties20 weergaven

7 berichten · pagina 1 van 1

Dexter

Lid · Topicstarter

Berichten
139
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hi, ik ben bezig met login en punten systeem.
Alles werkt op 1 ding na.
Als je bent ingelogd laat hij zien hoeveel punten je hebt enzo.
Maar hij laat die van alle gebruikers zien.

Source:

[KNIP IVM RIPPEN]

Hoe laat ik de statistieken van de betredende gebruiker zien?

NIET RIPPEN A.U.B.
0
Berichten
5.897
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
stats.php

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]includes/connect.php[/COLOR][COLOR= #007700];[/COLOR]

[URL="http://www.php.net/mysql_select_db"]mysql_select_db[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"punten"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$con[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM leden WHERE id = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][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_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]))
  {[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Uw ID is: [/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br>[/COLOR][COLOR= #007700];[/COLOR]
  
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]U gebruikersnaam is: [/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]];[/COLOR]
  
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br>[/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]U heeft: [/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]punten[/COLOR][COLOR= #007700]];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000] punten[/COLOR][COLOR= #007700];
  
  }[/COLOR]

[URL="http://www.php.net/mysql_close"]mysql_close[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$con[/COLOR][COLOR= #007700]);[/COLOR]
?>


$_SESSION[id] kan ook iets anders zijn zoals myusername ofzo, ik vind het script nogal raar om het te vinden
0
Berichten
5.498
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Maartenl schreef:
stats.php
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]includes/connect.php[/COLOR][COLOR= #007700];[/COLOR]

[URL="http://www.php.net/mysql_select_db"]mysql_select_db[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"punten"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$con[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM leden WHERE id = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][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_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]))
  {[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Uw ID is: [/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br>[/COLOR][COLOR= #007700];[/COLOR]
  
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]U gebruikersnaam is: [/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]];[/COLOR]
  
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br>[/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]U heeft: [/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]punten[/COLOR][COLOR= #007700]];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000] punten[/COLOR][COLOR= #007700];
  
  }[/COLOR]

[URL="http://www.php.net/mysql_close"]mysql_close[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$con[/COLOR][COLOR= #007700]);[/COLOR]
?>


$_SESSION[id] kan ook iets anders zijn zoals myusername ofzo, ik vind het script nogal raar om het te vinden

Hij maakt helemaal geen SESSION aan emoEDIT: Ohw, hij maakt wel een sessie aan.
0
Berichten
5.897
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Klaasie schreef:
Eerdere citaten tonen
Maartenl schreef:
stats.php
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]includes/connect.php[/COLOR][COLOR= #007700];[/COLOR]

[URL="http://www.php.net/mysql_select_db"]mysql_select_db[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"punten"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$con[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM leden WHERE id = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][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_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]))
  {[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Uw ID is: [/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br>[/COLOR][COLOR= #007700];[/COLOR]
  
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]U gebruikersnaam is: [/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]];[/COLOR]
  
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br>[/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]U heeft: [/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]punten[/COLOR][COLOR= #007700]];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000] punten[/COLOR][COLOR= #007700];
  
  }[/COLOR]

[URL="http://www.php.net/mysql_close"]mysql_close[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$con[/COLOR][COLOR= #007700]);[/COLOR]
?>


$_SESSION[id] kan ook iets anders zijn zoals myusername ofzo, ik vind het script nogal raar om het te vinden
Hij maakt helemaal geen SESSION aan emo
Session_register maar ik vond het een erg raar script.
0
Berichten
5.498
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hij maakt idd wel eens sessie aan, had het niet goed gezien yummieProbeer dit:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]includes/connect.php[/COLOR][COLOR= #007700];[/COLOR]

[URL="http://www.php.net/mysql_select_db"]mysql_select_db[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"punten"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$con[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM leden WHERE gebruikersnaam = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]myusername[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][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_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]))
  {[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Uw ID is: [/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br>[/COLOR][COLOR= #007700];[/COLOR]
  
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]U gebruikersnaam is: [/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]];[/COLOR]
  
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br>[/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]U heeft: [/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]punten[/COLOR][COLOR= #007700]];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000] punten[/COLOR][COLOR= #007700];
  
  }[/COLOR]

[URL="http://www.php.net/mysql_close"]mysql_close[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$con[/COLOR][COLOR= #007700]);[/COLOR]
?>
0
Dexter

Lid · Topicstarter

Berichten
139
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Klaasie schreef:
Hij maakt idd wel eens sessie aan, had het niet goed gezien yummieProbeer dit:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]includes/connect.php[/COLOR][COLOR= #007700];[/COLOR]

[URL="http://www.php.net/mysql_select_db"]mysql_select_db[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"punten"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$con[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM leden WHERE gebruikersnaam = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]myusername[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][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_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]))
  {[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Uw ID is: [/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br>[/COLOR][COLOR= #007700];[/COLOR]
  
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]U gebruikersnaam is: [/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]];[/COLOR]
  
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br>[/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]U heeft: [/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]punten[/COLOR][COLOR= #007700]];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000] punten[/COLOR][COLOR= #007700];
  
  }[/COLOR]

[URL="http://www.php.net/mysql_close"]mysql_close[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$con[/COLOR][COLOR= #007700]);[/COLOR]
?>
Bedankt het werkt!
0
Berichten
5.498
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Graag gedaan smile
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