Exemplo n.º 1
0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Insert Data</title>
    <link rel="stylesheet" type="text/css" href="css/bootstrap.css">
  </head>

<body>
 <?php 
function __autoload($class)
{
    include_once $class . ".php";
}
$obj = new oopCrud();
if (isset($_REQUEST['insert'])) {
    extract($_REQUEST);
    if ($obj->insertData($name, $email, $mobile, $address, "students")) {
        header("location:show.php?status_insert=success");
    }
}
// heredoc
echo @<<<show
<div class="container">
  <div class="container">
  <div class="btn-group">
    <button class="btn"><a href="show.php">Home</a></button>
  </div>
  <h3>Insert Your Data</h3>
  <form action="insert.php" method="post">
  \t<table width="400" class="table-borderd">
Exemplo n.º 2
0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Show Table</title>
    <link rel="stylesheet" type="text/css" href="css/bootstrap.css">
    <script type="text/javascript" src="js/bootstrap.js"></script>
  </head>

<?php 
function __autoload($class)
{
    include_once $class . ".php";
}
$obj = new oopCrud();
if (isset($_REQUEST['status'])) {
    echo "Your Data Successfully Updated";
}
if (isset($_REQUEST['status_insert'])) {
    echo "Your Data Successfully Inserted";
}
if (isset($_REQUEST['del_id'])) {
    if ($obj->deleteData($_REQUEST['del_id'], "students")) {
        echo "Your Data Successfully Deleted";
    }
}
?>
<div class="container">
  <div class="btn-group">
  <button class="btn"><a href="show.php">Home</a></button>
  <button class="btn"><a href="insert.php">Insert</a></button>
Exemplo n.º 3
0
<html>
 	
 	<head>
 	
 		<title>Edit Data</title>
 	
 	</head>

<body>

<?php 
function __autoload($class)
{
    include_once $class . ".php";
}
$obj = new oopCrud();
if (isset($_REQUEST['update'])) {
    extract($_REQUEST);
    if ($obj->update($id, $name, $email, $mobile, $address, "students")) {
        header("location:show.php?status=success");
    }
}
extract($obj->getById($_REQUEST['id'], "students"));
echo <<<show

<div id="div_bod">

\t<div id="div_btn">
\t\t<button><a href="show.php">Home</a></button>
\t</div>