I can only agree with dbwiz ,

It's true that you can write bad code in every language, but PHP makes things really easy for bad coders.

Update:Fixed wrong order blockquote,italic tags. Thanks Fletch.
I submit the following example I was confronted with recently after migrating an 'acquired' companies site from a Cobalt. Names have been changed to protect the guilty. I'm trying to discover why and how much they paid for this abortion.

I discussed with the developer the register_globals-ness of this code and it's reliance on php4.2.x session side effects and other things. His suggestion to

Best thing is look at the php.ini file on the old server. Also make sure the versions of php and mysql are the same.

Yeah - php and mysql circa 2002. This message broke the light barrier on it's way my supervisor.

<? ////////////////////////////////////////////////////////////////////// +////////// // // Filename: session.php // Author: Smee Again (ANONYMIZED@MERCHANT.COM) // Created: 01.Mar.2003 // Purpose: // // Notes: // // // // Changes: // //////////////// Lasciate ogni speranza voi ch'entrate ///////////// +////////// include_once("../class/engine/page.class"); include_once("../class/engine/security.class"); class Session { var $security; var $url; var $test; var $acid; var $language; function Session() { $this->security = new Security; $acid = ""; $language = "english"; } function is_admin() { return true; } function page_open() { // check for any routing echo "page open: route: " .$this->url;// die(); if ($this->url != "") { header("Location: $this->url"); } } function page_close() { // kill any routing //$this->url = ""; } function route($url) { $this->url = $url; } }; ?>
I particularly like


I can't believe it's not psellchecked

In reply to Re^2: OT :Web forum or mailing list ? by submersible_toaster
in thread Web forum or mailing list ? by szabgab

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.