Site loopt vast

Gestart doorRubenmaxie3 reacties17 weergaven

4 berichten · pagina 1 van 1

Rubenmaxie

Lid · Topicstarter

Berichten
592
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Heey,

Weet iemand hoe het kan, dat me site iedere keer vastloopt als ik naar één bepaalde
pagina gaat?

Dit is de code van die pagina:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"header.php"[/COLOR][COLOR= #007700]);[/COLOR]
?>
<html>
<head>
<style type="text/css">
<!--
h1 {
    font: 18pt;
}

h2 {
    font: 16pt;
}

a {
    color: #0000FF;
    text-decoration: none;
}

a:hover {
    color: #0000FF;
    text-decoration: underline;
}
-->
</style>
<title>Untitled</title>
</head>
<body>
<h1>Navigatie</h1>
<a href="safe.php">Home</a><br/>
<a href="profile.php">Profiel</a><br/>
<a href="memberlist.php">Ledenlijst</a><br/>
<a href="logout.php">Uitloggen</a><br/><br/>
<hr width="100%">
<table>
<tr>
<td>Positie:</td>
<td>Gebruikersnaam:</td>
<td>Punten:</td>
<td>Status:</td>
</tr>
[COLOR= #0000BB]<?php
$que[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT * FROM login_sessions"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$res[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$que[/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]$row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$res[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700])
{[/COLOR]
?>
<tr>
<td>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"-"[/COLOR][COLOR= #007700];[/COLOR] ?></td>
<td>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]];[/COLOR] ?></td>
<td>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]points[/COLOR][COLOR= #007700]];[/COLOR] ?></td>
<td>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"-"[/COLOR][COLOR= #007700];[/COLOR] ?></td>
</tr>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
</table>
</body>
</html>
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700];[/COLOR]
?>
0
Erik

Lid

Berichten
7.109
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik weet niet op dit helpt...

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"header.php"[/COLOR][COLOR= #007700]);[/COLOR]
?>
<html>
<head>
<style type="text/css">
<!--
h1 {
    font: 18pt;
}

h2 {
    font: 16pt;
}

a {
    color: #0000FF;
    text-decoration: none;
}

a:hover {
    color: #0000FF;
    text-decoration: underline;
}
-->
</style>
<title>Untitled</title>
</head>
<body>
<h1>Navigatie</h1>
<a href="safe.php">Home</a><br/>
<a href="profile.php">Profiel</a><br/>
<a href="memberlist.php">Ledenlijst</a><br/>
<a href="logout.php">Uitloggen</a><br/><br/>
<hr width="100%">
<table>
<tr>
<td>Positie:</td>
<td>Gebruikersnaam:</td>
<td>Punten:</td>
<td>Status:</td>
</tr>
[COLOR= #0000BB]<?php
$res[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM login_sessions"[/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]$res[/COLOR][COLOR= #007700]))
{[/COLOR]
?>
<tr>
<td>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"-"[/COLOR][COLOR= #007700];[/COLOR] ?></td>
<td>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]];[/COLOR] ?></td>
<td>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]points[/COLOR][COLOR= #007700]];[/COLOR] ?></td>
<td>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"-"[/COLOR][COLOR= #007700];[/COLOR] ?></td>
</tr>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
</table>
</body>
</html>


Mvg,
Erik
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Dat zal wel werken ja aangezien de topicstarter dit doet:

waneer je de sql kan fetchen (altijd dus) voer dit uit...

En erik doet:

waneer je nog een row van de fetch hebt voer dit uit...

Aangezien het 1e altijd door blijft gaan loopt hij vast in een oneindige loop wink
0
Rubenmaxie

Lid · Topicstarter

Berichten
592
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Oke, thnx! Ik snap het, yummie
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