I'm trying to write a script where one page handles most functions for a survey using MySQL as the backend.
The design here is the edit page (edit.php) gets input from the referring page on what to do and then includes the required code. But I'm having trouble getting variables to be seen by the includes.
For example:
On the main edit page (edit.php) the default calls the editMain include (editMain.inc) which displays all questions so you can select which one to edit.
When you hit the select button it calls the same edit.php script but passes the question ID and survey ID. Edit.php sees the variables properly but the include editQuestion (editQuestion.inc) they become unset. Defines get me around this problem but that seems like a poor hack.
Is this a bad design for my site or am I missing something?
Thanks!
Canadaman