I am very new to CakePHP and MySQL so I may not know how to properly ask this. I need to add a payment type radio button to a project I just inherited. I added the payment type radio button to the add and edit forms like this:
$options = array('check' => 'Check', 'credit' => 'Credit');
$attributes = array('legend' => false);
echo $this->Form->radio('payment', $options, $attributes);
The radio button shows up as expected but payment
is not in the MySQL database so
<?php echo h($purchaseOrder['PurchaseOrder']['payment']); ?>
causes
Notice (8): Undefined index: payment [APP\View\PurchaseOrders\view.ctp, line 81]
What is the best way to add payment
to the database? Is there a way to modify the database without losing existing records?