Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    Senior Coder
    Join Date
    Mar 2002
    Thanked 19 Times in 18 Posts

    Guidelines for posting a PHP snippet

    Use this forum to post a useful PHP snippet, whether a useful function or a small completed PHP script. In general the code must be small enough so that you can post its entire source here. Do not simply post a link to an external PHP site or product page (spam). This forum is used to illustrate PHP techniques and to provide easily digestible PHP codes, not the classifieds to advertise your PHP site or product. The later will be deleted without warning.

    Extended Rules:
    1) Snippets need to be tested & working
    2) Please check the PHP manual first to ensure you are not duplicating an internal PHP function (unless your version adds something missing from the original)
    3) If your code is potentially insecure due to editing for brevity please state that fact and point out possible problems. (if nothing else to stop all the `this is insecure` followups)
    4) Snippets which are deemed to be essentially pointless or not relevant will be removed , its nothing personal just quality control.
    5) Whilst we do not want to dictate coding standards please code for register_globals=off
    6) If your snippet requires a certain version of PHP , especially >=5.0 please state that fact.

    As a general rule (especially relating to point 4), your PHP snippet should add something that the PHP language cannot nativley do, or use built in PHP functions in such a way that you have a useful snippet of code. Snippets like:

    PHP Code:
    $variable rand(0,10);
    // $variable is now a random number between 0 and 10 
    will not qualify to be kept in the forum, as they dont add anything, they just use PHP internal functions in a very simple way. As stated, its nothing personal, just quality control.
    Last edited by missing-score; Dec 10th, 2005 at 04:11 AM.
    - George
    - JavaScript Kit- JavaScript tutorials and 400+ scripts!
    - JavaScript Reference- JavaScript reference you can relate to.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts