<div class="row" style="margin-top: 5%;"> <div class="col-md-8 col-md-offset-2"> <?php if (isset($_GET['location'])) { if (isset($lo) && !empty($lo)) { echo "<h3>" . $lo[0]->lo_name . "</h3>"; } $ayat = isset($_GET['location']) ? $this->my_func->encrypt($_GET['location']) : "No bus!"; $qrcode = new QRGenerator($ayat, 100); // 100 is the qr size print "<img src='" . $qrcode->generate() . "'>"; } ?> <table class="table table-striped"> <thead> <tr> <th>Location</th> <th>Type</th> <th>Action</th> </tr> </thead> <tbody> <?php if (isset($location) && !empty($location)) { foreach ($location as $lo) { ?> <tr> <td><?php echo $lo->lo_name;
<?php error_reporting(1); // base connect include "../config/connect.php"; include "../config/qrcode.php"; // $_POST $nis = $_POST["nisn"]; $nama = $_POST["nama"]; $email = $_POST["email"]; $psw = base64_encode($_POST["pass"]); // echo base64_decode("YXN1"); $qr = new QRGenerator(); $qr->setData($nama); $qr = "<img src=" . $qr->oyisam() . ">"; // Auto increment KW $r = mysql_query("SELECT COUNT(*)+1 FROM siswa"); $u = mysql_fetch_assoc($r); $n = $u["COUNT(*)+1"]; // print_r($u); // query $query = "INSERT INTO siswa VALUES('{$nis}','{$nama}','{$psw}','{$qr}','','','','','',2,{$n},{$n},{$n},{$n},{$n},{$n},{$n},{$n},{$n});"; $sql = mysql_query($query); $query2 = "INSERT INTO kelas VALUES(DEFAULT,'');"; $sql2 = mysql_query($query2); $query3 = "INSERT INTO prestasi VALUES(DEFAULT,'');"; $sql3 = mysql_query($query3); $query4 = "INSERT INTO pendidikan VALUES(DEFAULT,'');"; $sql4 = mysql_query($query4); $query5 = "INSERT INTO dt_ayah VALUES(DEFAULT,'','','','','','','');"; $sql5 = mysql_query($query5);