This is my code:
<?php
include"iht_config.php"; // connect
$name = $_POST['name'];
$p***w = $_POST['p***w'];
$rnd = $_POST['rnd'];
$score = $_POST['score'];
$x = mysql_query("UPDATE players SET $rnd='$score' WHERE name='$name' AND p***w='$p***w'")
or die (mysql_error());
if ($x){
header("location:iht_confirm.htm");
mysql_close($connect);
exit();
} else {
header("location:iht_not_confirm.htm");
mysql_close($connect);
exit();
}
?>
If all introduced data (name and p***w) is ok it updates data base and return confirm page.
If any data is wrong it doesnt update database, but goes again to confirm page, not to not_confirm page.
If i rename confirm and not_confirm pages as .php it doesnt work too.
Sorry bad english
What is wrong ?
Thank you
Jaya
<?php
include"iht_config.php"; // connect
$name = $_POST['name'];
$p***w = $_POST['p***w'];
$rnd = $_POST['rnd'];
$score = $_POST['score'];
$x = mysql_query("UPDATE players SET $rnd='$score' WHERE name='$name' AND p***w='$p***w'")
or die (mysql_error());
if ($x){
header("location:iht_confirm.htm");
mysql_close($connect);
exit();
} else {
header("location:iht_not_confirm.htm");
mysql_close($connect);
exit();
}
?>
If all introduced data (name and p***w) is ok it updates data base and return confirm page.
If any data is wrong it doesnt update database, but goes again to confirm page, not to not_confirm page.
If i rename confirm and not_confirm pages as .php it doesnt work too.
Sorry bad english
What is wrong ?
Thank you
Jaya
Comment