Hallo mensen,
Ik heb het volgende script:
<?PHP
$hostname = "db.pcextreme.nl";
$user = "private";
$password = "private";
$database = "private";
mysql_connect($hostname, $user, $password) or trigger_error(mysql_error(), E_USER_ERROR);
mysql_select_db($database) or trigger_error(mysql_error(), E_USER_ERROR);
$query = "Select * FROM teller where id = 1";
$result = mysql_query($query);
while(list($id, $aantal, $url) = mysql_fetch_row($result))
print("$id $aantal $url.<BR>\n");
$id = "1";
$aantal = $aantal + "1";
$query = "INSERT INTO teller (id, aantal) values('$id', '$aantal')";
$result = mysql_query($query) or die("unable to record your information");
echo("Informatie is opgeslagen.");
?>
Hij geeft:
unable to record your information
De tabellen in mysql zijn wel gewoon goed!
De bedoeling van het script is:
1). Bekijk: aantal
2). Print: aantal
3). Aantal + 1
4). Opslaan
Ik hoop dat iemand mij kan helpen, ik zie de fout niet.
1.768 views