PHP help me

Gestart doorJesper177 reacties875 weergaven

178 berichten · pagina 7 van 12

Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Aha, in Notepad++ zit een Reeindent C++ code.

Geinig....

Lijkt er ook op dat je aan het eind een sluit-accolade mist.
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
nou, wie lost het op?
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Jij?
of heb jij geen toetsenbord?

Als ik wat tips mag geven, met de hoop en belofte dat er wat mee gedaan wordt:
- }elseif(isset($_GET[lock])){

Waarom niet een GET parameter die action heet welke je lock, deleteshout, ads_add noemt?
met http://php.net/switch kan je die elseifjes veel netter afhandelen.

- Controleren of iets verstuur dis via POST doe je met:

if($_SERVER[REQUEST_METHOD]=="POST") {


en niet via:

if(isset($_POST[submit])){


Niet elke browser gaat er lekker mee om, als je de enter-knop gebruikt.

DEUVM
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Vervang .............

if(isset($_POST[submit])){

$uQuery = mysql_query("SELECT * FROM users WHERE username = " . mysql_real_escape_string($_POST[username]) . "") or die(mysql_error());
$uFetch = mysql_fetch_assoc($uQuery);

if(mysql_num_rows($uQuery) == 0){

echo <div id="error">Dit lid bestaat niet!</div>;

}else{

mysql_query("DELETE FROM factuur WHERE id = " . mysql_real_escape_string($_POST[fid]) . "") or die(mysql_error());

echo <div id="succes">Dit lid is succesvol verwijderd! <a href="index.php">Klik hier</a></div>; 

}

}else{

?>

<br />

Geef hieronder de gebruikersnaam in van de gebruik die je wilt verwijderen.<br /><br />

<form method="post" action="?p=admin&deleteuser">
Factuur id: <input type="text" name="fid" /><br /><br />
<input type="submit" name="submit" value="Verwijderen" />
</form>



}elseif(isset($_GET[factuur])){


door...

if(isset($_POST[submit])){

$uQuery = mysql_query("SELECT * FROM users WHERE username = " . mysql_real_escape_string($_POST[username]) . "") or die(mysql_error());
$uFetch = mysql_fetch_assoc($uQuery);

if(mysql_num_rows($uQuery) == 0){

echo <div id="error">Dit lid bestaat niet!</div>;

}else{

mysql_query("DELETE FROM factuur WHERE id = " . mysql_real_escape_string($_POST[fid]) . "") or die(mysql_error());

echo <div id="succes">Dit lid is succesvol verwijderd! <a href="index.php">Klik hier</a></div>; 

}

}

?>

<br />

Geef hieronder de gebruikersnaam in van de gebruik die je wilt verwijderen.<br /><br />

<form method="post" action="?p=admin&deleteuser">
Factuur id: <input type="text" name="fid" /><br /><br />
<input type="submit" name="submit" value="Verwijderen" />
</form>


[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]factuur[/COLOR][COLOR= #007700]])){[/COLOR]
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Vriendje, wel handig om mijn opmerkingen ook mee te nemen als je het helemaal goed wilt doen wink
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
te druk bloos
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Vriendje hoe pas je de editior bug aan en de chat bug?
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Welke bugs bedoel je? In whear systeem? Details?
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Whear systeem
De editor bug dat je niet in internet explorer kan editen/verwijderen
En de chat dat in internet explorer 2x post
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dubbelpost dan maak je met PHP dat hij met SQL een bericht uit "chat" tabel haalt met zelfde tekst die jij verzond, en afgelopen 5 seconden is gepost. Bij meer als 1 resultaat post die bericht niet.

De bug van Internet Exp weet ik niet, Misschien accepteert die geen javascript / jQuery?
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ja, dat wel hij accepteer jquery en javascript wel
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nou, hij moet dus jQuery kunnen. En ik ga je mijn chat niet geven, die is van Zillax.
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Geef dan een voorbeeld van de query
0
Berichten
5.897
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Jespar schreef:
Geef dan een voorbeeld van de query
Als de tijd 2x hetzelfde is en van dezelfde persoon is, dan echo je enkel de eerste.
Je biedt je wel aan als scripter, maar vraag hier aan ons om alles op te lossen ? Zo werkt het niet.
0
Jesper

Lid · Topicstarter

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

[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]db_connect.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]ubb.php[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]])){[/COLOR][URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Geen toegang[/COLOR][COLOR= #007700]);}[/COLOR]

[COLOR= #0000BB]$checkQuery[/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]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]
[COLOR= #0000BB]$checkFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$checkQuery[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$checkFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]kick_from_chat[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700])
{[/COLOR]

[URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Je bent gekicked van de chat![/COLOR][COLOR= #007700]);

}[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$checkFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]type[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]2[/COLOR] or [COLOR= #0000BB]$checkFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]type[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]3[/COLOR][COLOR= #007700]){[/COLOR]

[COLOR= #0000BB]$team[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700];

}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

[COLOR= #0000BB]$team[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700];

}[/COLOR]

[COLOR= #0000BB]$uQuery[/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]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]
[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]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]chat[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]){[/COLOR][URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Je hebt geen toegang tot de chatroom, dit kan komen door:<ul><li>Je hebt de chat nog niet gekocht</li><li>Een moderator heeft de toegang tot de chat voor jouw ontzegt</li></ul>[/COLOR][COLOR= #007700]);}[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]send[/COLOR][COLOR= #007700]])){[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$team[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]1[/COLOR] [COLOR= #007700]&&[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]message[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]/clear[/COLOR][COLOR= #007700])
{[/COLOR]

[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"TRUNCATE TABLE chat"[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/die"]die[/URL][COLOR= #007700]();

}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/strstr"]strstr[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]message[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #DD0000]/kick[/COLOR][COLOR= #007700]) &&[/COLOR] [COLOR= #0000BB]$team[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]){[/COLOR]

[COLOR= #0000BB]$user[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]/kick [/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]message[/COLOR][COLOR= #007700]]);[/COLOR]

[COLOR= #0000BB]$uQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users WHERE username = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$user[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][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] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
{[/COLOR]

[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE users SET kick_from_chat = 1 WHERE username = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$user[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO chat VALUES (
NULL,
"[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]<strong style="color: red;">[/COLOR] [COLOR= #007700].[/COLOR] htmlspecialchars[COLOR= #007700]([/COLOR][COLOR= #0000BB]$user[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000] werd gekicked van de chatroom.</strong>[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000]",
"[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]",
NOW()
);
"[/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/die"]die[/URL][COLOR= #007700]();

}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/strstr"]strstr[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]message[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #DD0000]/nochat[/COLOR][COLOR= #007700]) &&[/COLOR] [COLOR= #0000BB]$team[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]){[/COLOR]

[COLOR= #0000BB]$user[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]/nochat [/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]message[/COLOR][COLOR= #007700]]);[/COLOR]

[COLOR= #0000BB]$uQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users WHERE username = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$user[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][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] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
{[/COLOR]

[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE users SET chat = 0 WHERE username = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$user[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO chat VALUES (
NULL,
"[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]<strong style="color: red;">[/COLOR] [COLOR= #007700].[/COLOR] htmlspecialchars[COLOR= #007700]([/COLOR][COLOR= #0000BB]$user[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000] heeft geen toegang meer tot de chatroom.</strong>[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000]",
"[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]",
NOW()
);
"[/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/die"]die[/URL][COLOR= #007700]();

}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/strlen"]strlen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]message[/COLOR][COLOR= #007700]]) <[/COLOR] [COLOR= #0000BB]2[/COLOR][COLOR= #007700]){[/COLOR] [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]2[/COLOR][COLOR= #007700]); }[/COLOR]

[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO chat VALUES (
NULL,
"[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR]htmlspecialchars[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]message[/COLOR][COLOR= #007700]])) .[/COLOR] [COLOR= #DD0000]",
"[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]",
NOW()
);
"[/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/die"]die[/URL][COLOR= #007700]();

}

}[/COLOR]

[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE users SET last_in_chat = NOW() 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] 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]

?>

<div style="border: 1px solid #CCCCCC; padding: 8px; overflow: auto; width: 700px; height: 300px; float: left; margin-right: 10px;">

[COLOR= #0000BB]<?php

$cQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM chat ORDER BY id DESC LIMIT 50"[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$cFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$cQuery[/COLOR][COLOR= #007700])){[/COLOR]

[COLOR= #0000BB]$uQuery[/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] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$cFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]author[/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]
[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]

?>
<span style="font-size: 14px;">
<a target="_blank" href="http://[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$uFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR] ?>.whear.nl/">[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$uFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR] ?></a>:
</span>
<br />
<span style="margin-left: 6px; padding: 6px;">
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] ubb[COLOR= #007700]([/COLOR][URL="http://www.php.net/stripslashes"]stripslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$cFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]message[/COLOR][COLOR= #007700]]));[/COLOR] ?>
</span><br /><br />
[COLOR= #0000BB]<?php[/COLOR]

[COLOR= #007700]}[/COLOR]

?>
</div>
<div style="float: inherit; border: 1px solid #CCCCCC; padding: 8px; overflow: auto; width: 160px; height: 300px;">
<table style="border: 0;">
[COLOR= #0000BB]<?php

$oQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users WHERE DATE_SUB(NOW(),INTERVAL 5 SECOND) <= last_in_chat"[/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]$oFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$oQuery[/COLOR][COLOR= #007700])){[/COLOR]

?>
<tr>
<td style="width: 55px;">
<img src="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700](@[/COLOR][URL="http://www.php.net/file_exists"]file_exists[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]img/avatars/[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$oFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000].[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$oFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]avatar_type[/COLOR][COLOR= #007700]])){[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]img/avatars/[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$oFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000].[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$oFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]avatar_type[/COLOR][COLOR= #007700]]; }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]img/noavatar.jpg[/COLOR][COLOR= #007700]; }[/COLOR] ?>" style="width: 50px; height: 45px;"/>
</td>
<td>
<span style="font-size: 15px;"><a target="_blank" href="http://[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$oFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR] ?>.whear.nl/">[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$oFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR] ?></a></span>
</td>
</tr>
[COLOR= #0000BB]<?php[/COLOR]

[COLOR= #007700]}[/COLOR]
?>
</table>
</div>
Wat is het probleem hiervan?

Parse error: syntax error, unexpected $end in /home/uploaden/domains/manxi.nl/public_html/chatstuff.php on line 160
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