function addTesti($nama, $email, $isi_testi) { $konek = new Koneksi(); $konek->con(); $query = mysql_query("INSERT INTO `testimoni` (`testi_id`, `nama`, `email`, `isi_testi`) \r\n\t\tVALUES ('', '{$nama}', '{$email}', '{$isi_testi}');"); $testimoni = $this->viewTesti(); return $testimoni; }
function addPlan($Nama, $Email, $Telp, $Tgl_Pernikahan, $Tgl_Temu_WP, $Tempat_Temu) { $konek = new Koneksi(); $konek->con(); $query = mysql_query("INSERT INTO `planner` (`Plan_ID`, `Nama`, `Telp`, `Email`, `Tgl_Pernikahan`, `Tgl_Temu_WP`, `Tempat_Temu`) \r\n\t\tVALUES ('', '{$Nama}', '{$Telp}', '{$Email}', '{$Tgl_Pernikahan}', '{$Tgl_Temu_WP}', '{$Tempat_Temu}');"); $plan = $this->viewPlan(); return $plan; }
<ul> <li><a href="#">Prev</a></li> <li><a href="#">1</a></li> <li><a href="#">2</a></li> <li><a href="#">3</a></li> <li><a href="#">Next</a></li> </ul> </div>--> <!--daftar testimoni--> <?php //include_once('header.php'); echo "<div class='span8'>"; // connect to the database include '../model/koneksi.php'; $konek = new Koneksi(); $konek->con(); // number of results to show per page $per_page = 3; /* get results from database $result = mysql_query("SELECT * FROM testimoni") or die(mysql_error());*/ // figure out the total pages in the database $result = mysql_query("SELECT * FROM testimoni ORDER BY testi_id DESC"); $total_results = mysql_num_rows($result); $total_pages = ceil($total_results / $per_page); // check if the 'page' variable is set in the URL (ex: view-paginated.php?page=1) if (isset($_GET['page']) && is_numeric($_GET['page'])) { $show_page = $_GET['page']; // make sure the $show_page value is valid if ($show_page > 0 && $show_page <= $total_pages) { $start = ($show_page - 1) * $per_page;
function __construct() { $konek = new Koneksi(); $konek->con(); //return $this->link; }