sandwick Posted August 13, 2008 Posted August 13, 2008 Can some one tell me how to get to the DATA entered on this code listed below. It is in 'checkout_confirmation.php' ? <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main"><?php echo $confirmation['fields'][$i]['title']; ?></td> <td width="10">x<?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main"><?php echo $confirmation['fields'][$i]['field']; ?></td> </tr> I am trying to get the data entered in at $confirmation['fields'][$i]['field'] and then validate this after they key in a PO number in 'checkout_process.php. The code I have now will not validate the information being passed. Here is the code and it always fails, because it is validating a blank variable. // Do not allow PO # to be BLANK !!! if ( $confirmation['fields'][$i]['field'] == '' ) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, 'error_message=' . urlencode(ERROR_NO_PO_NUMBER), 'SSL')); } Bottom line is if the PO number is blank ... fail ! Any help would be appreciated. :blink:
insomniac2 Posted August 14, 2008 Posted August 14, 2008 I'm not sure if this will work but try it like this // Do not allow PO # to be BLANK !!! if (($confirmation['fields'][$i]['field'] == '') && ($selection[$i]['id'] == 'po')) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, 'error_message=' . urlencode(ERROR_NO_PO_NUMBER), 'SSL')); }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.