Roost3r
04-29-2003, 05:27 PM
I have some code i want to use in 2 areas of my program...
if(isset($_get['submit'])) {
someThing();
}
if(isset($_get['edit'])) {
someThing();
}
inside someThing() i get the vars from a form... Obviously this wont work because the scope of those vars is just inside the function... how could i get this to work so i can reuse the code; maybe declare the vars as Global in the function?
TIA
if(isset($_get['submit'])) {
someThing();
}
if(isset($_get['edit'])) {
someThing();
}
inside someThing() i get the vars from a form... Obviously this wont work because the scope of those vars is just inside the function... how could i get this to work so i can reuse the code; maybe declare the vars as Global in the function?
TIA