I'm making a website which asks input from user using this html code:
<form>
<input type="text" name="question1input1" />
</form>
But when I ran it on the second page using this php to upload into database:
$que1in1 = $_POST['question1input1'];
if ($que1in1 == "x-coordinate") {
$answer = '<text style=\'color: yellowgreen;\'>x-coordinate</text>';
$score = 1;
$snumber = $_SESSION['DcYnuJmQKJkkBPEY'];
$sql2 = "UPDATE `chapter 9 pre-test` SET `score1` = '$score' WHERE `chapter 9 pre-test`.`snumber`='$snumber';";
$sql3 = "UPDATE `chapter 9 pre-test` SET `1` = '".$answer."' WHERE `chapter 9 pre-test`.`snumber`='$snumber';";
if ($con->query($sql2) == TRUE) {}
else {echo "something happened... ".$score;}
if ($con->query($sql3) == TRUE) {}
else {echo "something happened... ".$answer;}
}
$sql2
returning as success, but $sql3
returning as an error.