Nog steeds die error hoor
?
?
?Sandcool schreef:toevoeging op 24 januari 2012, 19:20:59:Op het einde ipv Misschien?
Leuk dat je hem helpt, maar weet a.u.b. wel waar iemand het over heeft.
Het is vrij logisch dat aan het eind wel fout is, maar dat het geen oplossing voor het daadwerkelijke probleem is.
[COLOR= #0000BB]<?php
$sql[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT rank FROM gebruikers WHERE id ="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruiker[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
?> 
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/require"]require[/URL] [COLOR= #DD0000]connect.php[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$name[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$get[/COLOR] [COLOR= #007700]==[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$id[/COLOR] [COLOR= #007700]==[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruiker[/COLOR][COLOR= #007700]])[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]rank[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]){[/COLOR][URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je hebt geen toestemming om deze pagina te bekijken[/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]gebruiker[/COLOR][COLOR= #007700]])) {[/COLOR][URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]
<head>
<title>Leden beheren</title>
</head>
<body>
<form name="input" action="admin_edit.php">
<b>Naam</b></br>
<input type="text" name="username"/></br>
<b>Rank</b></br>
<input type="text" name="rank" /></br>
<b>Id</b></br>
<input type="text" name="id" /></br>
<b>Email</b></br>
<input type="text" name="email" /></br>
<input type="submit" value"Zoek" />
<form>
</body>
<?php [/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]U bent niet ingelogd[/COLOR][COLOR= #007700];}[/COLOR]?> [COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/require"]require[/URL] [COLOR= #DD0000]connect.php[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$name[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$get[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$id[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruiker[/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]gebruiker[/COLOR][COLOR= #007700]]))
{[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]rank[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je hebt geen toestemming om deze pagina te bekijken[/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]
<head>
<title>Leden beheren</title>
</head>
<body>
<form name="input" action="admin_edit.php">
<b>Naam</b></br>
<input type="text" name="username"/></br>
<b>Rank</b></br>
<input type="text" name="rank" /></br>
<b>Id</b></br>
<input type="text" name="id" /></br>
<b>Email</b></br>
<input type="text" name="email" /></br>
<input type="submit" value"Zoek" />
<form>
</body>[/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]U bent niet ingelogd[/COLOR][COLOR= #007700];
}[/COLOR]
?> require connect.php;
$name = $_POST[username];
$get = $_GET[username];
$id = $_SESSION[gebruiker]);
Vind veel variabelen prettig 
mysql_query ("
UPDATE gebruikers
SET log_ip=$_SERVER[REMOTE_ADDR"]
WHERE gebruikersnaam = Wouter
"); mysql_query ("
UPDATE gebruikers
SET log_ip=".$_SERVER[REMOTE_ADDR"]."
WHERE gebruikersnaam = Wouter
"); mysql_query ("
UPDATE gebruikers
SET log_ip=".$_SERVER[REMOTE_ADDR]."
WHERE gebruikersnaam = Wouter
"); Alexnder schreef:Verschil met mijn reactie ?mysql_query (" UPDATE gebruikers SET log_ip=".$_SERVER[REMOTE_ADDR]." WHERE gebruikersnaam = Wouter ");
Maartenl schreef:Kijk die lijn en vergelijk met mijnemysql_query ("
UPDATE gebruikers
SET log_ip=".$_SERVER[REMOTE_ADDR"]."
WHERE gebruikersnaam = Wouter
");

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/require"]require[/URL] [COLOR= #DD0000]connect.php[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$name[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$get[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$id[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruiker[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$sql1[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM gebruikers WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruiker[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]""[/COLOR][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]$sql1[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$sql2[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"select * FROM gebruikers WHERE gebruikersnaam = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]] .[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$row2[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql2[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$email[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$row2[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$username[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$row2[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$id[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$row2[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$rank[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$row2[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]rank[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$reg_ip[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$row2[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]reg_ip[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$log_ip[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$row2[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]log_ip[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$ban[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$row2[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ban[/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]gebruiker[/COLOR][COLOR= #007700]]))
{[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]rank[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je hebt geen toestemming om deze pagina te bekijken[/COLOR][COLOR= #007700];
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
?>
<head>
<title>Leden beheren</title>
</head>
<body>
<form name="input" action="admin_edit.php">
<b>Naam</b></br>
<input type="text" name="username" value="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$username[/COLOR] ?>"/></br>
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]]) {[/COLOR]?>
<b>Rank</b></br>
<input type="text" name="rank" value="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$rank[/COLOR][COLOR= #007700];[/COLOR] ?>"/></br>
<b>Id</b></br>
<input type="text" name="id" value="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$id[/COLOR][COLOR= #007700];[/COLOR] ?>"/></br>
<b>Email</b></br>
<input type="text" name="email" value="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$email[/COLOR][COLOR= #007700];[/COLOR] ?>"></br>
<b>Registratie IP</b></br>
<input type="text" name="reg_ip" value="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$reg_ip[/COLOR][COLOR= #007700];[/COLOR] ?>"/></br>
<b>Laatst ingelogd ip</b></br>
<input type="text" name="log_ip" value="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$log_ip[/COLOR][COLOR= #007700];[/COLOR] ?>"/></br>
<b>Ban</b></br>
<input type="text" name="ban" value="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$ban[/COLOR][COLOR= #007700];[/COLOR] ?>"/></br>
<input type="submit" value"Zoek" />
<form>
</body>
[COLOR= #0000BB]<?php[/COLOR] [COLOR= #007700]}[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"
UPDATE gebruikers
SET gebruikersnaam="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]",
email= "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]",
rank= "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]rank[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]",
reg_ip= "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]reg_ip[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" ,
log_ip= "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]log_ip[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" ,
ban= "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ban[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" ,
id= "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_get[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"
WHERE id =".$_SESSION[gebruiker]."");
}
} else {
echo [/COLOR]U bent niet ingelogd[COLOR= #007700];
}[/COLOR]
?>