my session wont work.
i dont know why.
here is the in file1:
session_start();
header("Cache-control: private");
include('fogsheader.php');
ibase_pconnect("path.xxx","GUEST", "123456" );
if (ibase_errmsg()) {
echo "error: " . ibase_errmsg();
exit;
}
global $HTTP_SERVER_VARS;
//register session variables
$idnumber = $_POST['idnumber'];
$password = $_POST['password'];
session_register($idnumber);
session_register($password);
session_register($name);
session_register($currentyear);
session_register($currentsem);
session_register($subject);
session_register($section);
session_register($schedule);
session_register($room);
session_register($remarks);
....
?>
i used the registered variables on this page for querying from an interbase database and everythings good.
but on file2:
<?php
session_start();
header("Cache-control: private");
include('fogsheader.php');
session_register($action);
$action = $_POST["action"];
echo "
<div id=\"CenterContent\">
<p>You are logged in as: <strong>$name</strong>. <br>
Idnumber: <strong>$idnumber</strong><br>
Academic Year: <strong>$currentyear</strong>
Semester: <strong>$currentsem</strong><br>
Subject: <strong>$subject - $section</strong><br>
Action: <strong>$action</strong></p>
";
ibase_pconnect("path","GUEST", "123456" );
if (ibase_errmsg()) {
echo "error: " . ibase_errmsg();
exit;
}
if ($action=="View Class List") {
$Q = ibase_query("SELECT * FROM SELECT_ENROLLEES(?,?,?,?)", $subject, $section, $currentyear, $currentsem);
echo "<table width=\"100%\">
<tr>
<td><strong>Name</strong></td>
<td><strong>Course</strong></td>
<td><strong>Idnumber</strong></td>
<td><strong>Date Enrolled</strong</td>
</tr>
<form action=\"http://www.msumain.edu.ph/scripts/fogs/fogsprint.php\" method=\"post\" target=\"_self\">
";
$i = 0;
while ($R = ibase_fetch_row($Q)) {
$i++;
echo "
<tr>
<td>$R[1]</td>
<td valign=\"top\">$R[3] </td>
<td valign=\"top\">$R[0] </td>
<td valign=\"top\">$R[4] </td>
";
}
echo "
</table></form><br>
";
}
else if ($action=="Enter Grades") {
$Q = ibase_query("SELECT * FROM SELECT_GRADESHEET(?,?,?,?)", $subject, $section, $currentyear, $currentsem);
echo "<table width=\"100%\">
....
?>
how come the session variables dont work no more?
im using php version 4.2.3
the page comes out like:
you are logged on as <BLANK>
academic year <BLANK> semester <BLANK>
damn!!! <BLANK><BLANK><BLANK> nothing is coming out of my queries!
i remember the query working and then the next day it just goes poof! <BLANK>! nothing comes out.
i also tried using $_SESSION['variablename'] for defining session variables but an error comes out. how come??
thanx to anyone who can help out....