Greetings All,
I'm trying to write a php script that will allow a user to update some information in a database. Instead of writing it directly in the WB code editor, I would prefer to write it in a separate file then include(' '); my file within the WB code module. However, I've run into a problem accessing the $_SESSION['USERNAME'] variable which I'm going to use to ascertain database access priviledges. It seems to get forgotten somewhere between WB and my script.
If I do this within the WB code editor, it works
echo "<p>Hello: ".$_SESSION['USERNAME'];
However, it doesn't work if I enter this within the WB code editor
include('scripts/updateUnitAlertRoster.php');
and my separate script contains this
<?php
session_start();
echo "Hello: ".$_SESSION['USERNAME'];
?>
Can anyone point me in the right direction for accessing the $_SESSION variables?
Thanks,
Ande
Huntsville, AL