i have a php script where ppl can update a row...
but when i click the submit button it says it is send but it isn't.
it does'nt send a thing!!
please help me how i can get this fixed!
thank you all!
php script aanpassen2.php
<?php
if ($ap == 'ja') {
mysql_connect('localhost','flashtw_djkoe','*****'); // btw, i hope puppies wasn't your real pword
mysql_select_db('flashtw_test');
// normally i would avoid double quotes, but in cases like this, they'll just simplify
$sql = "UPDATE `reparatie` SET ";
if ($klaar == 'on') {
$sql .= "`reparatie` = 'opgelost',";
} // no semi-colons here
// this is what baffles me, there is no reason to split up the query like this...
$sql .= "`prijs` = '$prijs',`uren` = '$uur' WHERE `id` = '$id' LIMIT 1";
mysql_query($sql) or die(mysql_error());
echo 'Product aangepast!<br>Bedankt.';
} else {
?>
<html>
<head>
<title>Aanpassen Pagina</title>
</head>
<body>
Kies een naam om aan te passen:
<select name="id" size="1">
<?
mysql_connect('localhost','flashtw_djkoe','puppies');
mysql_select_db('flashtw_test');
$query = mysql_query("SELECT * FROM reparatie");
while ($row = mysql_fetch_array($query)) {
echo "<option value=\"$row[id]\">$row[naam]</option>";
}
?>
</select><BR>
<form action="aanpassen2.php" method="post">
<input type="checkbox" name="klaar">Probleem opgelost.<BR>
Prijs: <input type="text" name="prijs" size="5"> EUR.<BR>
Uren: <input type="text" name="uren" size="5"><BR>
<input type="hidden" name="ap" value="ja">
<input type="reset" value="Invoer wissen" name="B2">
<input type="submit" value="Verzend het probleem" name="submit">
</body>
</html>
<?
}
?>