This is the code :
<?php
/****************************************************************
* include configuration and other files *
****************************************************************/
session_start();
include_once("includes/conf.php"
;
include_once("includes/MyTemplate.php"
;
$tpl = new MyTemplate("templates/index(1024x768).html"
;
/********************************************************
* open connection to oracle *
*******************************************************/
$conn = oci_connect($db_user, $db_password, $db_name);
/********************************************************
* Insert data from database to site *
********************************************************/
//echo $nama;
//$act="";
if (!empty($_POST["nama"]) && !empty($_POST["password"]))
{
$query = "SELECT * FROM MEMBER WHERE ID_PEGAWAI='".$_POST["nama"]."' AND PASSWORD='".$_POST["password"]."'";
$parse = oci_parse($conn, $query);
$result = oci_execute($parse, OCI_DEFAULT);
$row = oci_fetch_array($parse, OCI_RETURN_NULLS);
//echo $row['ID_PEGAWAI'];
if ($row['ID_PEGAWAI']==$_POST['nama'] && $row['PASSWORD']==$_POST['password'])
{
session_register("nama"
;
session_register("password"
;
header("Location:index2.php"
;
}
}
/*if ($_GET["act"]=='logout')
{
session_destroy();
//header("Location:index.php"
;
}*/
$tpl->write();
?>
the error message appear when I erase the comment for the last if,