thank you for your replies.
Last night, I gave this a try and it seemed to work, however please tell me if it causes any security problems. I know you don't want to turn globals on and make every variable default to being global and I do not chose to do so.
Here is what I did.
sell.php is my main page, it calls all the functions it needs from fns.php.
I defined every variable in sell.php, an example of some are below:
<?php
include ('fns.php');
// create variables for every field in the form on page 1
global $est;
global $ast;
global $frn;
global $strt;
global $title;
global $tag;
I than went in the function in fns.php and also defined the variables I needed as follows:
<?php
include ('fns.php');
// create variables for every field in the form on page 1
global $est;
global $ast;
global $frn;
global $strt;
global $title;
global $tag;
$est = $_POST['est'];
$ast = $_POST['ast'];
$frn = $_POST['frn'];
$strt = $_POST['strt'];
$title = $_POST['title'];
$tag = $_POST['tag'];
This seems to allow all the variables to then become global and be accessible outside of the function.
Then, in any function that needs access to these variables, such as a database inserter function, I just add the global $variablename and than it has access to them.
Is there any security concern here? I am not inserting any sesitive data into the variables so I am not to worried about them being viewed, if they could be. And I feel by using $variablename = $_POST['variablename'] is pretty safe compared to not using it.
Thanks for the advice on using session variables, that may be a good idea if the site gets large. Do cookies need to be enabled for sessions or not? I know some people block cookies so if they are required, that may stop some people from accessing the website properly.
Leave me some input,
Thanks again.
Paul