By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,813 Members | 1,253 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,813 IT Pros & Developers. It's quick & easy.

Need help with PHP.

P: 17
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.


if($_SESSION[page] == ""){
else if($_SESSION[page] == "Open Pilots DB"){
else if($_SESSION[page] == "Add_Log_Entry"){
} else {
echo "Error!Nothing to do!";

// Start of functions
function Add_Log_Entry($array){
$_SESSION = "Do_Next_Function"
//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.

Apr 24 '06 #1
Share this Question
Share on Google+
2 Replies

Expert Mod 5K+
P: 8,916
You can read data from the URL using the super global array $_GET.

for you example URL then

$_GET['vegtible'] === "munchies"

would be true
Apr 24 '06 #2

P: 17
Thx again for the help. That was what I was looking for and how I thought it should work. I must have done something wrong before because I would get a page not found error before but I do have it working now with your help and I can stop using session information for that stuff.
Apr 24 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.