Answer to Question #44274 in AJAX | JavaScript | HTML | PHP for lalit

Question #44274
function showQuestion(_direction)
{
if(_direction == 'prev') current_question--;
else if(_direction == 'next') current_question++;
else if(_direction == 'first') current_question = 1;
else if(_direction == 'last') current_question = 5;
xmlhttp.open("GET","Exam.php?SID="+current_question,true);
xmlhttp.send();
</script>
</head>
<body onload="showQuestion('first')">
<div id="container">
<?php
include "Header.php";
?>
<div id="content">
<div id="left">
<h1>Welcome <?php echo $_SESSION['Name'];?></h1>
<p>
<?php
$SID=$_GET['Id'];
include "examples 2.html";
$con1 = mysqli_connect("localhost","root","login","lalit","3307")or die("Error " . mysqli_error($con));
$sql1 = "SELECT * from quiz_schedule where Schedule_Id='".$SID."'";
$result1 = mysqli_query($con1,$sql1);
while($row1 = mysqli_fetch_array($result1))
{
$Quiz_Id=$row1['Quiz_Id'];
$Semester=$row1['Semester'];
$Subject_Id=$row1['Subject_Id'];
}
mysqli_close($con1);
$con = mysqli_connect("localhost","root","login","lalit
0
Expert's answer

Answer in progress...

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS