I have a site that is basically using three pages to create a fairly complex layout. What I'm doing is setting a variable on the first page.
The main page that websites browse to and using two include files to fill in the content based on the variable. My example variables are:
$url="workstation-metal-weld.php";
$worker_type_variable="Fabrication";
$activity = 'Metal: Weld';
after the variables I call a include file to do all the database work
include("includes/workstations/workstation-main.php");
The problem is my $work_type_variable does not seem to be working inside of workstation-main.php, it seems to just fill in a blank... (I get a result from my sql statement that basically means it's not finding any results but if I type the word Fabrication into the Where statement things appear).
$select="SELECT * FROM workers WHERE worker_type='".$worker_type_variable."' AND worker_id NOT IN (SELECT fk_worker_id FROM sfc_current_work WHERE fk_part_number='".$part_number."' OR work_type<>'Direct Work')";
This does appear inside of a function (that again works when I replace the $worker_type_variable.
Any thoughts on what might be going wrong?
Thanks