He Mensen,,
Ik heb een php error in dit script:
En die mysql.php ziet er zo uit:
De error is die in de titel namelijk:
Alvast Bedankt,
Inpakken
Ik heb een php error in dit script:
PHP:
<?
include 'mysql.php';
$getal=$_POST['getal'];
// Create the random tag questions array
$randomq[] = "1";
$randomq[] = "2";
$randomq[] = "3";
$randomq[] = "4";
$randomq[] = "5";
$randomq[] = "6";
$randomq[] = "7";
$randomq[] = "8";
$randomq[] = "9";
$randomq[] = "10";
// Select a random question from the array above
srand ((double) microtime() * 100);
$chosen = rand(0,count($randomq)-1);
// Appoint the variable
$tag_question = $randomq[$chosen];
if ($getal==$tag_question
mysql_query("UPDATE users SET credits = '25' WHERE name = '".$rawname."' LIMIT 1") or die(mysql_error());
) {
echo "Je heb gewonnen!";
}else{
echo "Jammer je heb verloren!";
}
?>
En die mysql.php ziet er zo uit:
PHP:
<?php
$_CONFIG["Username"] = 'root';
$_CONFIG["Password"] = 'kirsten15';
$_CONFIG["Host"] = 'localhost';
$Verbinding = MySql_connect($_CONFIG["Host"], $_CONFIG["Username"], $_CONFIG["Password"]);
if($Verbinding == false) // Verbinding is mislukt!
{
trigger_error("Kan geen verbinding maken met de database");
}
MySql_close($Verbinding);
?>
De error is die in de titel namelijk:
Code:
Parse error: syntax error, unexpected T_STRING
Alvast Bedankt,
Inpakken