PHP help me

Gestart doorJesper177 reacties875 weergaven

178 berichten · pagina 1 van 12

Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php

$uQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM overzicht ORDER BY id DESC LIMIT 50"[/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]
[COLOR= #0000BB]$uFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uQuery[/COLOR][COLOR= #007700]);[/COLOR]

 [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<h2>Menu</h2><br>"[/COLOR][COLOR= #007700];[/COLOR]
 [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$uFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]menu[/COLOR][COLOR= #007700]];[/COLOR] 
 [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<h2>Admin</h2><br>"[/COLOR][COLOR= #007700];[/COLOR]
 [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$uFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]admin[/COLOR][COLOR= #007700]];[/COLOR] 
 [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<h2>mod</h2><br>"[/COLOR][COLOR= #007700];[/COLOR]
 [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$uFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]mod[/COLOR][COLOR= #007700]];[/COLOR] 

 ?>


Hij geeft een witte pagina aan
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Staat er wel iets in de database
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ja dat staat er
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Limit 0,50
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nog niks..
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Gooi het eens in een while loop.
0
Berichten
1.054
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Misschien nog even een config.php includen? emo
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
mysql_num_rows() geeft een integer aan, geen array winkFetch het dus eerst eens met mysql_fetch_assoc().
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Aarclay schreef:
mysql_num_rows() geeft een integer aan, geen array winkFetch het dus eerst eens met mysql_fetch_assoc().
OMG hoe blind kan ik zijn xd dat had ik ook gelijk moeten zien >.<
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Je had het ook kunnen debuggen, door $uFetch te echoen of door var_dump te halen.
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Als ik dit heb:

[COLOR= #0000BB]<?php

$uQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM overzicht ORDER BY id DESC LIMIT 0,50"[/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]
[COLOR= #0000BB]$uFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uQuery[/COLOR][COLOR= #007700]);[/COLOR]

?>
<h2>Domeinen</h2><br>
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$uFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]domein[/COLOR][COLOR= #007700]];[/COLOR] ?>
<h2>Hostings</h2><br>
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$uFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]host[/COLOR][COLOR= #007700]];[/COLOR] ?>
<h2>Vpsen</h2><br>
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$uFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]vps[/COLOR][COLOR= #007700]];[/COLOR] ?>


Hoe doe ik dan dat alleen je eigen domeinen hostings en vpsen ziet en niet van iedereen
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Gebruik WHERE in je query.

Enig basistutorial heeft het hier ongetwijfeld over.
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Notice: Undefined index: member_id in /home/uploaden/domains/manxi.nl/public_html/controlpanel/pages/pages.php on line 3

toevoeging op 26 januari 2012, 19:36:42:

[COLOR= #0000BB]<?php

$uQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM overzicht WHERE member_id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]member_id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/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]


?>
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
$_GET[member_id] Deze bestaat niet...
Blijkbaar geef je hem niet mee in je URL.
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ik wil dat hij in de database komt bij member_id en dat alleen dat id van de user hem kan zien
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