script

Post on 08-Jul-2016

215 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

view

TRANSCRIPT

<?php “MENAMPILKAN DATA PERTANYAAN DARI DATABASE”

if(!isset($_GET['idpertanyaan'])){//tampilkan pertanyaan pertama

$sqlp = "select * from diagnosa_motherboard where mulai='Y'";$rs=mysql_query($sqlp);$data=mysql_fetch_array($rs);

//bentuk pertanyaan echo "<form>";echo "<form>";echo "<legend> <small> Mari mulai Mendiagnosa

</small></legend>";echo "<center>";echo "<h1>".$data['solusi_dan_pertanyaan']."</h1></center><br>";

“MENAMPILKAN PILIHAN OPSI BENAR ATAU TIDAK”echo '

<div class="span5" style="margin-left:90px;"> <div class="alert alert-success">

<div class="control-group "> <label class="control-label" style="width:120px;">Apakah Benar </label><div class="controls" style="margin-left:150px;">';

echo "<input type='radio' name='idpertanyaan' value='".$data['bila_benar']."'>Benar<br>";echo '</div></div></div></div><div class="span5"> <div class="alert alert-error"><div class="control-group "> <label class="control-label" style="width:120px;">Apakah Salah</label><div class="controls" style="margin-left:150px;">';

echo "<input type='radio' name='idpertanyaan' value='".$data['bila_salah']."'>Tidak<br>";

echo '</div></div></div></div>';

“MENAMPILKAN TOMBOL LANJUT”echo "<input type='submit' class='btn btn-primary btn-block btn-large' value='Lanjut ' >";}else{“MENAMPILKAN PERTANYAAN SELANJUTNYA / SOLUSI”

$idsolusi=$_GET['idpertanyaan'];$sqlp = "select * from diagnosa_motherboard where id=$idsolusi";

$rs=mysql_query($sqlp);

$data=mysql_fetch_array($rs);

echo "<form>";echo "<legend><small> Mari mulai Mendiagnosa </small></legend>";echo "<center>";echo "<h1>".$data['solusi_dan_pertanyaan']."</h1></center><br>";

“MENAMPILKAN PILIHAN OPSI BENAR ATAU TIDAK”if($data['selesai']!="Y"){

echo '<div class="span5" style="margin-left:90px;"> <div class="alert alert-

success"><div class="control-group "> <label class="control-label" style="width:120px;">Apakah Benar </label><div class="controls" style="margin-left:150px;">';

echo "<input type='radio' name='idpertanyaan' value='".$data['bila_benar']."'>Benar<br>";echo '</div></div></div></div><div class="span5"> <div class="alert alert-error"><div class="control-group "> <label class="control-label" style="width:120px;">Apakah Salah</label><div class="controls" style="margin-left:150px;">';

echo "<input type='radio' name='idpertanyaan' value='".$data['bila_salah']."'>Tidak<br>";

echo '</div></div></div></div>';

“MENAMPILKAN TOMBOL LANJUT”echo "<input type='submit' class='btn btn-primary btn-block btn-large' value='Lanjut ' >";“MENAMPILKAN TOMBOL SOLUSI”echo "<a class='btn btn-block btn-large' href='Solusi_motherboard.php?idpertanyaan=1'>Solusi </a>";

}

echo "</form>";echo '</div>';

}?><center><img src="Motherboard.jpg" width="728" height="400" />“MENAMPILKAN TOMBOL KEMBALI MELAKUKAN DIAGNOSA”

<a href='''' class='btn btn-block btn-large ' /> <H2>Kembali Melakukan Diagnosa</H2> </a>

top related