I am trying to write a PHP script for tracking information and storing it in text files. The program has gotten to the point that I now need several php pages for the program to work however I can't find information on passing information from one PHP page to another. I know how to read the $_ENV with CGI to pass the information but am trying to learn PHP over CGI.
Is there a way to read the URL information for something like this example in PHP?
Example URL
Or is there some other function I have over looked to pass this information from say
valog.php to vaadditem.php
P.S. Thx in advance for any help.
For now I am using the below section to passin formation between scripts. Scripts are a combination of HTML and PHP.
Should I just be using an Include statement to pass this information instead or is using the session command better or like I originaly posted is there a way to get the information from the link.
<?php
session_start() ;
if($_SESSION[page] == ""){
Display_Login_M enu();
}
else if($_SESSION[page] == "Open Pilots DB"){
Open_function_D B();
}
else if($_SESSION[page] == "Add_Log_Entry" ){
Add_Log_Entry($ array);
} else {
echo "Error!Noth ing to do!";
}
// Start of functions
function Add_Log_Entry($ array){
$_SESSION = "Do_Next_Functi on"
//some HTML
<div align="center"> <font color="#6699CC" ><a href="../valog/addlog.php">Add New Flight</a></font></div>
This is where I get stuck I can no longer pass the information from the HTML menu to the next script unless I setup a session in advance but I would think there would be an easier way to just pass that information using the link and readding it directly from the link.
}
?>
Is there a way to read the URL information for something like this example in PHP?
Example URL
Or is there some other function I have over looked to pass this information from say
valog.php to vaadditem.php
P.S. Thx in advance for any help.
For now I am using the below section to passin formation between scripts. Scripts are a combination of HTML and PHP.
Should I just be using an Include statement to pass this information instead or is using the session command better or like I originaly posted is there a way to get the information from the link.
<?php
session_start() ;
if($_SESSION[page] == ""){
Display_Login_M enu();
}
else if($_SESSION[page] == "Open Pilots DB"){
Open_function_D B();
}
else if($_SESSION[page] == "Add_Log_Entry" ){
Add_Log_Entry($ array);
} else {
echo "Error!Noth ing to do!";
}
// Start of functions
function Add_Log_Entry($ array){
$_SESSION = "Do_Next_Functi on"
//some HTML
<div align="center"> <font color="#6699CC" ><a href="../valog/addlog.php">Add New Flight</a></font></div>
This is where I get stuck I can no longer pass the information from the HTML menu to the next script unless I setup a session in advance but I would think there would be an easier way to just pass that information using the link and readding it directly from the link.
}
?>
Comment