3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<div class="box best-selling"> <h3><?php echo $title?></h3> <table border="0" cellspacing="0"> <tbody> <tr><td> <?php error_reporting(E_ALL & ~E_NOTICE); ?> <div style="border:1px dotted red;padding:10px;margin:10px;"> <div class="contact_info_title"><b>INFORMASI</b></div> <div style="padding:6px;font-size:12px;"> Untuk melihat pemilihan sepeda motor anda, anda dapat memasukkan data anda pada form berikut. Mohon untuk mengisi data yang sebenarnya, karena data tersebut akan melakukan proses pemilihan sepeda motor yang sesuai kemampuan anda. </div> </div> <div id="contact_form"> <head> <script> $(document).ready(function(){ stoploading(); }) </script> </head> <h2>Form Pemilihan Sepeda Motor Menggunakan Fuzzy</h2> <form method="post"> <div class="form_row"> <label>Nama:</label><input type="text" name="nm_pms" size="40" class="contact_input" /><br /> <?php echo form_error('nm_pms'); ?> </div> <div class="form_row"> <label>Alamat:</label><input type="text" name="alamat" size="60" class="contact_input" /><br /> <?php echo form_error('alamat'); ?> </div> <div class="form_row"> <label>Kecamatan:</label> <select name="kota"> <option value="">Pilih Kecamatan</option> <option value="Jombang">Jombang</option> <option value="Kencong">Kencong</option> <option value="Tempurejo">Tempurejo</option> <option value="Sumberbaru">Sumberbaru</option> <option value="Gumukmas">Gumukmas</option> <option value="Umbulsari">Umbulsari</option> <option value="Puger">Puger</option> <option value="Semboro">Semboro</option> <option value="Tanggul">Tanggul</option> <option value="Wuluhan">Wuluhan</option> <option value="Jenggawah">Jenggawah</option> <option value="Silo">Silo</option> <option value="Sumberjambe">Sumberjambe</option> <option value="Ledokombo">Ledokombo</option> <option value="Balung">Balung</option> <option value="Ambulu">Ambulu</option> <option value="Bangsalsari">Bangsalsari</option> <option value="Mumbulsari">Mumbulsari</option> <option value="Panti">Panti</option> <option value="Rambipuji">Rambipuji</option> <option value="Mayang">Mayang</option> <option value="Sukowono">Sukowono</option> <option value="Sukorambi">Sukorambi</option> <option value="Jelbuk">Jelbuk</option> <option value="Ajung">Ajung</option> <option value="Arjasa">Arjasa</option> <option value="Kalisat">Kalisat</option> <option value="Kaliwates">Kaliwates</option> <option value="Pakusari">Pakusari</option> <option value="Patrang">Patrang</option> <option value="Sumbersari">Sumbersari</option> </select> <?php echo form_error('kota'); ?> </div> <div class="form_row"> <label>Pekerjaan:</label><input type="text" name="pekerjaan" size="30" class="contact_input" /><br /> <?php echo form_error('pekerjaan'); ?> </div> <div class="form_row"> <label>Gaji:</label><input type="text" name="gaji" size="30" class="contact_input" /><br /> <?php echo form_error('gaji'); ?> </div> <div class="form_row"> <label>Pengeluaran Perbulan:</label><input type="text" name="p_bulan" size="30" class="contact_input" /><br /> <?php echo form_error('p_bulan'); ?> </div> <div class="form_row"> <label>Uang Muka:</label><input type="text" name="u_muka" size="30" class="contact_input" /><br /> <?php echo form_error('u_muka'); ?> </div> <div class="form_row"> <label>Jumlah Cicilan:</label> <select name="j_cicil"> <option value="">Pilih Jumlah Cicilan</option> <option value="12">12</option> <option value="24">24</option> <option value="36">36</option> <option value="48">48</option> <option value="12">12</option> <option value="18">18</option> <option value="24">24</option> <option value="30">30</option> <option value="36">36</option> <option value="11">11</option> <option value="23">23</option> <option value="35">35</option> </select> <?php echo form_error('j_cicil'); ?> </div> <div class="form_row"> <label>Cicilan Perbulan:</label><input type="text" name="c_bulan" size="30" class="contact_input" /><br /> <?php echo form_error('c_bulan'); ?> </div> <div class="form_roww"> <label>&nbsp;</label> <input type='submit' onclick="Setujui()" id='kirim' name='simpan' value='Lanjut' class=""/> |&nbsp; <a href='#' OnClick='history.back()'> < Kembali </a> </div> <div style="clear:both"></div> <div align="center"> <div id="loading"></div> </div> </form> </div> <div style="clear:both;"></div> <script> function Setujui(){ document.getElementById('simpan').disabled = true; showloading(); } </script> <?php if(isset($_POST['simpan'])){ $o = mysql_query("SELECT * FROM fuzzy WHERE nama_kriteria = 'kecil'"); $p= mysql_fetch_row($o); $i = mysql_query("SELECT * FROM fuzzy WHERE nama_kriteria = 'sedang1'"); $u= mysql_fetch_row($i); $m = mysql_query("SELECT * FROM fuzzy WHERE nama_kriteria = 'besar'"); $n= mysql_fetch_row($m); $g = mysql_query("SELECT * FROM fuzzy WHERE nama_kriteria = 'rendah'"); $h= mysql_fetch_row($g); $z = mysql_query("SELECT * FROM fuzzy WHERE nama_kriteria = 'sedang2'"); $x= mysql_fetch_row($z); $c = mysql_query("SELECT * FROM fuzzy WHERE nama_kriteria = 'tinggi'"); $v= mysql_fetch_row($c); $t = mysql_query("SELECT * FROM fuzzy WHERE nama_kriteria = 'ringan'"); $r= mysql_fetch_row($t); $q = mysql_query("SELECT * FROM fuzzy WHERE nama_kriteria = 'sedang3'"); $w= mysql_fetch_row($q); $k = mysql_query("SELECT * FROM fuzzy WHERE nama_kriteria = 'berat'"); $l= mysql_fetch_row($k); $c_bulan = $_POST['c_bulan']; $gaji = $_POST['gaji']; $p_bulan = $_POST['p_bulan']; //Fuzzy Pengeluaran //kecil $kecil = ($p[4] - $p_bulan) / ($p[4] - $p[3]); //echo 'kecil = '.$p[4].' - '.$p_bulan.' / '.$p[4].' - '.$p[3].' </br>'; //echo ''.$kecil.'</br>'; //sedang if($u[2] < $p_bulan && $p_bulan < $u[3] ){ $sedang1 = ($p_bulan - $u[2]) / ($u[3] - $u[2]); } else { $sedang1 = ($u[4] - $p_bulan) / ($u[4] - $u[3]); } //echo 'sedang = '.$p_bulan.' - '.$u[2].' / '.$u[3].' - '.$u[2].' </br>'; //echo ''.$sedang1.'</br>'; //besar $besar = ($p_bulan - $n[2]) / ($n[3] - $n[2]); //echo 'besar = '.$p_bulan.' - '.$n[2].' / '.$n[3].' - '.$n[2].' </br>'; //echo ''.$besar.'</br>'; //Fuzzy Gaji //rendah $rendah = ($h[4] - $gaji) / ($h[4] - $h[3]); //sedang if($x[2] < $gaji && $gaji < $x[3] ){ $sedang2 = ($gaji - $x[2]) / ($x[3] - $x[2]); } else { $sedang2 = ($x[4] - $gaji) / ($x[4] - $x[3]); } //tinggi $tinggi = ($gaji - $v[2]) / ($v[3] - $v[2]); //Fuzzy Cicilan //ringan $ringan = ($r[4] - $c_bulan) / ($r[4] - $r[3]); //sedang if($w[2] < $c_bulan && $c_bulan < $w[3] ){ $sedang3 = ($c_bulan - $w[2]) / ($w[3] - $w[2]); } else { $sedang3 = ($w[4] - $c_bulan) / ($w[4] - $w[3]); } //berat $berat = ($c_bulan - $l[2]) / ($l[3] - $l[2]); $insert_gaji = mysql_query("insert into da_gaji(id,gaji,rendah,sedang,tinggi) values('','$gaji','$rendah','$sedang2','$tinggi')"); $insert_pengeluaran = mysql_query("insert into da_pengeluaran(id,pengeluaran,kecil,sedang,besar) values('','$p_bulan','$kecil','$sedang1','$besar')"); $insert_cicilan = mysql_query("insert into da_cicilan(id,cicilan,ringan,sedang,berat) values('','$c_bulan','$ringan','$sedang3','$berat')"); $kesimpulan1 = $kecil; $ket = "kecil"; if($sedang1 > $kesimpulan1){ $kesimpulan1 = $sedang1; $ket = "sedang"; } else if ($besar > $kesimpulan1){ $kesimpulan1 = $besar; $ket = "besar"; } $kesimpulan2 = $rendah; $ket2 = "rendah"; if($sedang2 > $kesimpulan2){ $kesimpulan2 = $sedang2; $ket2 = "sedang"; } else if ($tinggi > $kesimpulan2){ $kesimpulan2 = $tinggi; $ket2 = "tinggi"; } $kesimpulan3 = $ringan; $ket3 = "ringan"; if($sedang3 > $kesimpulan3){ $kesimpulan3 = $sedang3; $ket3 = "sedang"; } else if ($berat > $kesimpulan3){ $kesimpulan3 = $berat; $ket3 = "berat"; } /* echo $this->pquery->form_remote_tag(array( 'url'=>site_url('kredit/cek'), 'update'=>'#contact_form', 'id'=>'form', 'type'=>'post')); */ $hasil = mysql_query("SELECT * FROM rules WHERE pengeluaran = '$ket' and gaji = '$ket2' and cicilan = '$ket3' "); $hasilfix= mysql_fetch_row($hasil); if($hasilfix[3] == "rendah"){ ?> <script language="javascript"> window.location.href="kredit/tampil_rendah"; </script> <?php //echo "rendah"; /* echo $this->pquery->form_remote_tag(array( 'url'=>site_url('kredit/tampil_rendah'), 'update'=>'#contact_form', 'id'=>'form', 'type'=>'post'));*/ } else if($hasilfix[3] == "sedang"){ ?> <script language="javascript"> window.location.href="kredit/tampil_sedang"; </script> <?php //echo "sedang"; /* echo $this->pquery->form_remote_tag(array( 'url'=>site_url('kredit/tampil_sedang'), 'update'=>'#contact_form', 'id'=>'form', 'type'=>'post'));*/ } else if($hasilfix[3] == "tinggi"){ ?> <script language="javascript"> window.location.href="kredit/tampil_tinggi"; </script> <?php //echo "tinggi"; /* echo $this->pquery->form_remote_tag(array( 'url'=>site_url('kredit/tampil_tinggi'), 'update'=>'#contact_form', 'id'=>'form', 'type'=>'post'));*/ } else { echo 'Rules tidak ditemukan!'; }} ?> </td></tr> </tbody> </table> </div>
based on 5ZMgT
Output for 7.0.0 - 7.2.0
<div class="box best-selling"> <h3> Notice: Undefined variable: title in /in/qcoW8 on line 2 </h3> <table border="0" cellspacing="0"> <tbody> <tr><td> <div style="border:1px dotted red;padding:10px;margin:10px;"> <div class="contact_info_title"><b>INFORMASI</b></div> <div style="padding:6px;font-size:12px;"> Untuk melihat pemilihan sepeda motor anda, anda dapat memasukkan data anda pada form berikut. Mohon untuk mengisi data yang sebenarnya, karena data tersebut akan melakukan proses pemilihan sepeda motor yang sesuai kemampuan anda. </div> </div> <div id="contact_form"> <head> <script> $(document).ready(function(){ stoploading(); }) </script> </head> <h2>Form Pemilihan Sepeda Motor Menggunakan Fuzzy</h2> <form method="post"> <div class="form_row"> <label>Nama:</label><input type="text" name="nm_pms" size="40" class="contact_input" /><br /> Fatal error: Uncaught Error: Call to undefined function form_error() in /in/qcoW8:26 Stack trace: #0 {main} thrown in /in/qcoW8 on line 26
Process exited with code 255.
Output for 5.4.0 - 5.6.28
<div class="box best-selling"> <h3> Notice: Undefined variable: title in /in/qcoW8 on line 2 </h3> <table border="0" cellspacing="0"> <tbody> <tr><td> <div style="border:1px dotted red;padding:10px;margin:10px;"> <div class="contact_info_title"><b>INFORMASI</b></div> <div style="padding:6px;font-size:12px;"> Untuk melihat pemilihan sepeda motor anda, anda dapat memasukkan data anda pada form berikut. Mohon untuk mengisi data yang sebenarnya, karena data tersebut akan melakukan proses pemilihan sepeda motor yang sesuai kemampuan anda. </div> </div> <div id="contact_form"> <head> <script> $(document).ready(function(){ stoploading(); }) </script> </head> <h2>Form Pemilihan Sepeda Motor Menggunakan Fuzzy</h2> <form method="post"> <div class="form_row"> <label>Nama:</label><input type="text" name="nm_pms" size="40" class="contact_input" /><br /> Fatal error: Call to undefined function form_error() in /in/qcoW8 on line 26
Process exited with code 255.