By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,664 Members | 1,656 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,664 IT Pros & Developers. It's quick & easy.

sharing some codes

P: n/a
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.

Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
> Ive 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, Id 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
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.