Bank Holiday boozers wake up with sore heads after raucous Easter Sunday antics in Leeds and Newcastle
Council's 'crazy' plans to prioritise Welsh over English in schools blasted by teachers... but what do parents think?
The stunning Essex home with its very own treehouse and Japanese garden
Chaotic scenes as dozens of travellers swamp Harrods for traditional Easter meet-up - after previously moaning department store wouldn't let them in at Christmas
CodeSOD: The Variable Toggle
A common class of bad code is the code which mixes server side code with client side code. This kind of thing:
<script> <?php if (someVal) { ?> var foo = <? echo someOtherVal ?>; <?php } else { ?> var foo = 5; <?php } ?> </script>We've seen it, we hate it, and is there really anything new to say about it?
Well, today's anonymous submitter found an "interesting" take on the pattern.
<script> if(linkfromwhere_srfid=='vff') { <?php $vff = 1; ?> } </script>Here, they have a client-side conditional, and based on that conditional, they attempt to set a variable on the server side. This does not work. This cannot work: the PHP code executes on the server, the client code executes on the client, and you need to be a lot more thoughtful about how they interact than this.
And yet, the developer responsible has done this all over the code base, pushed the non-working code out to production, and when it doesn't work, just adds bug tickets to the backlog to eventually figure out why- tickets that never get picked up, because there's always something with a higher priority out there.
Revealed: The trick Irish traveller families used at six bars in the same town... before suing them for thousands
The harsh judgments Queen Elizabeth faced before winning the nation's heart
The heartwarming bond between Queen Elizabeth II and her grandfather George V - and how the King's prayer was answered
ROBERT HARDMAN: Prince Andrew nearly edged past the Dean of Windsor at St. George's Chapel... and made sure he was first inside after the King and Queen
Nepo baby reveals incredible weight loss in rare outing with his famous family
Liz Hurley's lookalike son Damian, 23, has surprising reaction to her shock romance with Billy Ray Cyrus
From Darvel to Dortmund, and Kelty to Qatar, ON THE ROAD'S Hugh MacDonald reflects on a lifelong odyssey that has taken him to football's fields of dreams
Fury over plans for newbuild mansion on picturesque Devon coastline
How Earl Grey and limoncello were fused to create Britain's best loaf by Derbyshire bakery
Return-to-Office Policies Are Impacting Neurodivergent Workers
Read more of this story at Slashdot.