Author Topic: sometimes the stupid just hurts  (Read 1998 times)

micah

  • A real person, on the Internet.
  • Ass Wipe
  • Posts: 6915
  • Karma: +58/-55
  • Truth cannot contradict truth.
    • micahj.com
sometimes the stupid just hurts
« on: October 24, 2012, 09:34:49 AM »
I'm working on fixing some issues on an old site that apparently my company built years before any of us worked here.  Everything about the programming on this site is FUBAR. I mean everything, from the logic of how pages are laid out to the repetative use of redundent code (on the same page no less.)  this morning, I stubmled across this little gem:

Code: [Select]
<?php
...
$mailing_city=$row['mailing_city'];
$mailing_cityOther=$row['mailing_cityOther'];
...
if(
$mailing_cityOther){
 print(
"".stripslashes($mailing_cityOther)."");
}else{
 if(
$mailing_cityOther){
  print(
"".stripslashes($mailing_cityOther)."");
 }else{
  print(
"".stripslashes($mailing_city)."");
 }
}

?>
"I possess a device, in my pocket, that is capable of accessing the entirety of information known to man.  I use it to look at pictures of cats and get in arguments with strangers."

Mike

  • Jackass In Charge
  • Posts: 11248
  • Karma: +168/-32
  • Ex Asshole - a better and more caring person.
Re: sometimes the stupid just hurts
« Reply #1 on: October 24, 2012, 10:03:42 AM »
That's...... special

Steve

  • This 49%er supports Romney
  • Just a Jackass
  • *
  • Posts: 16120
  • Karma: +31/-410
  • Mr. Mom
Re: sometimes the stupid just hurts
« Reply #2 on: October 24, 2012, 12:48:05 PM »
well alrighty then
hey ethic if you and i were both courting lily allen..... oh wait, which one of us has a relationship that lasted more than the bus ride home?