Hi, i bought a framework website which i am altering for a client and i am trying to add a new feature to it.
i have added new field to mysql table
i have added lines of code to show up on form, the choice in new feature will be 'manual' or 'automatic'.
and im stuck with the code as it keeps adding manual, no matter what i choose.
in mysql i added new field called 'transmissiontype' and data type of 'enum' with length/values set to 'manual' and 'automatic' and set a default of 'manual'
my object is have a select box showing manual and automatic, defaulted to manual.
i have added this line where the form is asking for info, it errors when submitting and im sure this bits wrong, but cannot see the wood for the forrest
( isset($_POST['transmissionTypeInput']) ? $transmission_type = (bool)($_POST['transmissionTypeInput']) : $transmission_type = false );
( $transmission_type ? $transmission_type = 'manual' : $transmission_type = 'automatic' );
there is another file which is the front end form and the previous code was from a file which is the controller, this next bit of code is from the main form
<!-- adding transmission type **** manual and automatic **** --> <div class="input-prepend"> <span class="add-on" style="width:150px;overflow:hidden;"><?php echo $_LANG['NEW_VEHICLE_TRANSMISSION_TYPE_LABEL'];?></span> <select name="transmissionTypeInput" style="width:569px;"> <?php
$automatic = '';
$manual = '';
if( isset($_SESSION['vin_session']) ){
if( $_SESSION['vin_session']['automatic'] ){
$automatic = 'selected="selected"';
} else {
$manual = 'selected="selected"';
}
}
?> <option value="manual" <?php echo $manual;?>><?php echo $_LANG['NEW_VEHICLE_TRANSMISSION_TYPE_OPTION_MANUAL'];?></option> <option value="automatic" <?php echo $automatic;?>><?php echo $_LANG['NEW_VEHICLE_TRANSMISSION_TYPE_OPTION_AUTOMATIC'];?></option> </select> </div> <!-- end of adding transmission type **** manual and automatic **** -->
my form tells me there is an internal error, i have tried adding debugging, but wont show up
help please obi-wan