PHP interesse |
|
Beste Sitemasters,
De onderstaande code geeft de volgende error:
Parse error: syntax error, unexpected '}' in /usr/export/www/hosting/urqbz/index.php on line 10
<?php
$username = $_POST["username"];
$password = $_POST["password"];
$link = mysql_connect("localhost", ".....", ".....");
mysql_select_db("urqbz");
$query='SELECT username FROM `users` ';
$result_set= mysql_query($query);
if ($result_set){
$record= mysql_fetch_row($result_set);
foreach ($record as $value) {
print "<em>$value </em>"; // print the row
if ($username == $value) {
$ok = ja;
setcookie("inlogged", "85579584034598", time()+7200);
setcookie ("name", "$username", time()+7200);
header ("location:http://www.basdekwant.nl")
}
}
if (ok != ja) {
header ("location:http://www.basdekwant.nl?error=ja")
}
?>
<?php $username = $_POST["username"]; $password = $_POST["password"]; $query='SELECT username FROM `users` '; if ($result_set){ foreach ($record as $value) { print "<em>$value </em>"; // print the row if ($username == $value) { $ok = ja; header ("location:http://www.basdekwant.nl") } } if (ok != ja) { header ("location:http://www.basdekwant.nl?error=ja") } ?>
Hoe komt dit?
Bij voorbaat dank voor de hulp,
Urqbz
|