tt
This commit is contained in:
6
test.php
6
test.php
@@ -47,14 +47,12 @@
|
|||||||
$c= "aq_".$i;
|
$c= "aq_".$i;
|
||||||
$d=$_POST[$a]+$_POST[$b]*10;
|
$d=$_POST[$a]+$_POST[$b]*10;
|
||||||
$sql5 = "UPDATE UserAnswer SET $c=$d WHERE Student_ID=$_POST[student_id]";
|
$sql5 = "UPDATE UserAnswer SET $c=$d WHERE Student_ID=$_POST[student_id]";
|
||||||
$sql7 = "SELECT * FROM Persons WHERE num=".$_POST[$b];
|
$sql7 = "SELECT * FROM Persons WHERE num=$_POST[$b]";
|
||||||
$rowquestion = mysqli_fetch_array(mysqli_query($con,$sql7))['answer'];
|
$rowquestion = mysqli_fetch_array(mysqli_query($con,$sql7))['answer'];
|
||||||
echo $rowquestion;
|
echo $rowquestion;
|
||||||
if((int)$_POST[$a] == $rowquestion ) {
|
if($_POST[$a] == $rowquestion && $_POST[$a]) {
|
||||||
if((int)$_POST[$a] != 0){
|
|
||||||
$scort++;
|
$scort++;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (!mysqli_query($con,$sql5))
|
if (!mysqli_query($con,$sql5))
|
||||||
{
|
{
|
||||||
$sql6="ALTER TABLE UserAnswer ADD $c INT(11) NOT NULL";
|
$sql6="ALTER TABLE UserAnswer ADD $c INT(11) NOT NULL";
|
||||||
|
|||||||
Reference in New Issue
Block a user