OK, I'm making the transition from PL/SQL to PHP so bear with me.
I have a form with a search button. The user presses the button, and is presented with a search form. Then fill in the form and then get a list of results (from Oracle) with radio buttons. I want to pass the values from the search result back to the original form. If you could just start me in the right direction, this will be a good learning exp. Some code:
This code produces the search results:
$CustName = $_POST['CustName'];
if (!$conn) {
$e = oci_error();
print htmlentities($e['message']);
exit;
}
$query = "select f_name,l_name, cust_id from
from customers
where cust_name like upper('%$CustName%')";
$stid = oci_parse($conn, $query);
if (!$stid) {
$e = oci_error($conn);
print htmlentities($e['message']);
exit;
}
$r = oci_execute($stid, OCI_DEFAULT);
if (!$r) {
$e = oci_error($stid);
echo htmlentities($e['message']);
exit;
}
print '<table class="Table" cellspacing="1" cellpadding="5" rules="none"
frame="void" border="9px" bordercolor="#000000"
summary="Procedure Report: Detailed and/or summarized report">';
print '<colgroup>';
print '<col>';
print '<col>';
print '<col>';
print '<col>';
print '</colgroup>';
print '<tr>';
print '<th class=" header" scope="col"> </th>';
print '<th class=" header" colspan="6" scope="colgroup"></th>';
print '</tr>';
print '<tr>';
print '<th class=" header" scope="col"></th>';
print '<th class=" header" scope="col">First Name</th>';
print '<th class=" header" scope="col">Last Name</th>';
print '<th class=" header" scope="col">Customer ID</th>';
print '</tr>';
print '</thead>';
print '<tbody>';
while ($row = oci_fetch_array($stid, OCI_RETURN_NULLS)) {
print '<tr>';
print '<td class=" Data">';
print "<input name='Custlist' type='radio' value=>";
print '</td>';
foreach ($row as $item) {
print '<td class="r Data">';
print ($item?htmlentities($item):' ');
print '</td>';
}
print '</tr>';
}
print '</body>';
oci_close($conn);
?>