Hi i have three php scripts
one that the user can choose the optioons from a form
other that shows the options that the the user have choosed
another where the records are inserted on database
So i am using php/Oracle and passing variables via
$_POST[VARIABLES], between the three php scripts
And i need to maintain (via session variables i think!?)
to catch the code from the description of the various database tables itens that are used on the form (they all are recorded, in one table but the data comes from various tables, and the code is needed)
I am doing:
<?php
$cmdstr_areas = "SELECT CODIGO, DESCRICAO FROM AREAS__ACIDENTE";
$parsed_areas = ociparse($db_conn, $cmdstr_areas);
ociexecute($parsed_areas);
$nrows_areas = ocifetchstatement($parsed_areas, $results_areas);
for ($i = 0; $i < $nrows_areas; $i++ ) {
echo "<option>" . $results_areas["DESCRICAO"][$i] . "</option>";
$_SESSION['COD_AREAS_ACIDENTE'] = $results_areas["CODIGO"][$i];
}
OCIFreeStatement($cmdstr_areas);
OCILogoff($db_conn);
?>
recording the session from ond escript to another:
$SESSION['COD_AREAS_ACIDENTE'] = $SESSION['COD_AREAS_ACIDENTE'];
and checking the variable at the final script:
var_dump($_SESSION['COD_AREAS_ACIDENTE']);
My problem is : nothing is showed on the var_dump. So how can i get the code from the previous choosed description on the first script?