Generally speaking, $300 doesn’t go very far in the world of custom software. If you’re lucky, it might be enough to fix a typo in a production application. These days, with the advent of IT Project Portals (as discussed before) that provide everyone access to certain developers from certain countries, $300 can go a long way. Not long enough to build working software, of course, but surely long enough to generate lots and lots of worthless code. At least, that was the experience with Christopher’s client.

Christopher’s client is a large (as in, one of the “Big 5”) advertising firms that decided to initially place their RFP for a survey application on an IT Project Portal. A few months and $300 later, they ended up with about 500 PHP-files (31 of which are class files without any members) and a database schema that stores all values in VARCHARs. And it all “almost worked.” Fortunately, they had Christopher to help “debug” it.

Several months and certainly a whole lot more than $300 later, Christopher was able to get it “mostly working.” Of all the things he “refactored out,” the following method of redisplaying form selections was among Christopher’s favorite …

<td class='txt_label' valign='top'>
<?php
     if($_SESSION["EducationID"]==Null)
     {
?>
<input type="radio" name="EducationID" value="High school">High school<br>
<input type="radio" name="EducationID" value="Some college">Some college<br>
<input type="radio" name="EducationID" value="In college">In college<br>
<input type="radio" name="EducationID" value="College graduate">College graduate<br>
<input type="radio" name="EducationID" value="Grad / professional school">Grad / professional school<br>
<input type="radio" name="EducationID" value="Post grad">Post grad<br>
<input type="radio" name="EducationID" value="" checked>No Answer<br>
<?php
     }
?>

<?php
     if($_SESSION["EducationID"]=="High school")
     {
?>
<input type="radio" name="EducationID" value="High school"  checked>High school<br>
<input type="radio" name="EducationID" value="Some college">Some college<br>
<input type="radio" name="EducationID" value="In college">In college<br>
<input type="radio" name="EducationID" value="College graduate">College graduate<br>
<input type="radio" name="EducationID" value="Grad / professional school">Grad / professional school<br>
<input type="radio" name="EducationID" value="Post grad">Post grad<br>
<input type="radio" name="EducationID" value="">No Answer<br>
<?php
     }
?>

<?php
     if($_SESSION["EducationID"]=="Some college")
     {
?>
<input type="radio" name="EducationID" value="High school">High school<br>
<input type="radio" name="EducationID" value="Some college" checked>Some college<br>
<input type="radio" name="EducationID" value="In college">In college<br>
<input type="radio" name="EducationID" value="College graduate">College graduate<br>
<input type="radio" name="EducationID" value="Grad / professional school">Grad / professional school<br>
<input type="radio" name="EducationID" value="Post grad">Post grad<br>
<input type="radio" name="EducationID" value="">No Answer<br>
<?php
     }
?>

<?php
     if($_SESSION["EducationID"]=="In college")
     {
?>
<input type="radio" name="EducationID" value="High school">High school<br>
<input type="radio" name="EducationID" value="Some college">Some college<br>
<input type="radio" name="EducationID" value="In college" checked>In college<br>
<input type="radio" name="EducationID" value="College graduate">College graduate<br>
<input type="radio" name="EducationID" value="Grad / professional school">Grad / professional school<br>
<input type="radio" name="EducationID" value="Post grad">Post grad<br>
<input type="radio" name="EducationID" value="">No Answer<br>
<?php
     }
?>

<?php
     if($_SESSION["EducationID"]=="College graduate")
     {
?>
<input type="radio" name="EducationID" value="High school">High school<br>
<input type="radio" name="EducationID" value="Some college">Some college<br>
<input type="radio" name="EducationID" value="In college">In college<br>
<input type="radio" name="EducationID" value="College graduate" checked>College graduate<br>
<input type="radio" name="EducationID" value="Grad / professional school">Grad / professional school<br>
<input type="radio" name="EducationID" value="Post grad">Post grad<br>
<input type="radio" name="EducationID" value="">No Answer<br>
<?php
     }
?>

<?php
     if($_SESSION["EducationID"]=="Grad / professional school")
     {
?>
<input type="radio" name="EducationID" value="High school">High school<br>
<input type="radio" name="EducationID" value="Some college">Some college<br>
<input type="radio" name="EducationID" value="In college">In college<br>
<input type="radio" name="EducationID" value="College graduate">College graduate<br>
<input type="radio" name="EducationID" value="Grad / professional school" checked>Grad / professional school<br>
<input type="radio" name="EducationID" value="Post grad">Post grad<br>
<input type="radio" name="EducationID" value="">No Answer<br>
<?php

     }
?>

<?php
     if($_SESSION["EducationID"]=="Post grad")
     {
?>
<input type="radio" name="EducationID" value="High school">High school<br>
<input type="radio" name="EducationID" value="Some college">Some college<br>
<input type="radio" name="EducationID" value="In college">In college<br>
<input type="radio" name="EducationID" value="College graduate">College graduate<br>
<input type="radio" name="EducationID" value="Grad / professional school">Grad / professional school<br>
<input type="radio" name="EducationID" value="Post grad" checked>Post grad<br>
<input type="radio" name="EducationID" value="">No Answer<br>
<?php
     }
?>

<?php
     if($_SESSION["EducationID"]=="No Answer")
     {
?>
<input type="radio" name="EducationID" value="High school">High school<br>
<input type="radio" name="EducationID" value="Some college">Some college<br>
<input type="radio" name="EducationID" value="In college">In college<br>
<input type="radio" name="EducationID" value="College graduate">College graduate<br>
<input type="radio" name="EducationID" value="Grad / professional school">Grad / professional school<br>
<input type="radio" name="EducationID" value="Post grad">Post grad<br>
<input type="radio" name="EducationID" value="" checked>No Answer<br>
<?php
     }
?>

</td>
[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!