> I’ve two pages from wich I add some records. The add records is
quite long
(about 100 lines, and 100 for modifying) and for mantainance
reasons, I’d like to share this part between those 2 pages.
As the original part takes $HTTP_POST_VARS fields (about 2 times 40
fields), how can I do it simple ??? a function, an include ???
Please tell me the best way.
Regards.
You can create an include file, and put your code in there. Then
"include" this file where it logically should be.
In addition to include, you can put the common code in a function, and
then call the function. Then just include the file at the beginning
of your code, and call the function as applicable.
The 2nd solution is cleaner.
--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL:
http://www.dbForumz.com/PHP-sharing-...ict124558.html
Visit Topic URL to contact author (reg. req'd). Report abuse:
http://www.dbForumz.com/eform.php?p=415985