Code:
$insertSQL = sprintf("INSERT INTO spec_rx (spec_rx_id, FK_px_id, spec_rx_date, FK_user_id, spec_rx_rsph, spec_rx_rcyl, spec_rx_raxis, spec_rx_rhprism, spec_rx_rhprismbase, spec_rx_rvprism, spec_rx_rvprismbase, spec_rx_rnadd, spec_rx_rnhprism, spec_rx_rnhprismbase, spec_rx_rnvprism, spec_rx_rnvprismbase, spec_rx_rintadd, spec_rx_rinthprism, spec_rx_rinthprismbase, spec_rx_rintvprism, spec_rx_rintvprismbase, spec_rx_lsph, spec_rx_lcyl, spec_rx_laxis, spec_rx_lhprism, spec_rx_lhprismbase, spec_rx_lvprism, spec_rx_lvprismbase, spec_rx_lintadd, spec_rx_linthprism, spec_rx_linthprismbase, spec_rx_lintvprism, spec_rx_lintvprismbase, spec_rx_lnadd, spec_rx_lnhprism, spec_rx_lnhprismbase, spec_rx_lnvprism, spec_rx_lnvprismbase, ext_rx) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['SpecRxID'], "int"),
GetSQLValueString($_POST['pxID'], "int"),
GetSQLValueString($_POST['specRxDate'], "date"),
GetSQLValueString($_POST['userID'], "int"),
GetSQLValueString($_POST['rsph'], "double"),
GetSQLValueString($_POST['rcyl'], "double"),
GetSQLValueString($_POST['raxis'], "double"),
GetSQLValueString($_POST['rHprism'], "double"),
GetSQLValueString($_POST['rHprismbase'], "text"),
GetSQLValueString($_POST['rVprism'], "double"),
GetSQLValueString($_POST['rVprismbase'], "text"),
GetSQLValueString($_POST['rNradd'], "double"),
GetSQLValueString($_POST['rNrHprism'], "double"),
GetSQLValueString($_POST['rNrHprismbase'], "text"),
GetSQLValueString($_POST['rNrVprism'], "double"),