<?php $mysqli = mysqli_connect("localhost","root","","squarellt"); $cid = required_param('id', PARAM_INT); class segment { public function unitseg_set1() { $subject = $mysqli->query('SELECT * FROM order_subject WHERE id='.$cid.''); while($row=$subject->fetch_array() ) { echo '<div>'.$row['chem_name'].'</div>'; } } public function unitseg_set2() { $subject = $mysqli->query('SELECT * FROM order_subject WHERE id='.$cid.''); while($row=$subject->fetch_array() ) { echo '<div>'.$row['physiotherapy_nn'].'</div>'; } } public function unitseg_set3() { $subject = $mysqli->query('SELECT * FROM order_subject WHERE id='.$cid.''); while($row=$subject->fetch_array() ) { echo '<div>'.$row['commun_gg'].'</div>'; } } } ?>
require_once('segment.php'); $acc = new segment(); $account1 = $acc->unitseg_set1(); $account2 = $acc->unitseg_set2(); $account3 = $acc->unitseg_set3(); echo $account1; echo $account2; echo $account3;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)