Hi Guys...
I have almost finidhed my cart, but I have a problem that I don'yt know how to code.
From the form:
PHP Code:
$output[] = '<tr>';
$output[] = '<td align="center" colspan="2"><br><br><font color="#ff0000">Please select from the following</font></td>'; if ($row['accapproved'] == '1') {
$output[] = '</tr>';
$output[] = '<tr height="30">';
$output[] = '<td align="center" colspan="2">On account: <input type="radio" name="delivery" value="account" /> ';
$output[] = '</td></tr>';
}
$output[] = '<tr height="30">';
$output[] = '<td align="center" colspan="2">Cash on Delivery: <input type="radio" name="delivery" value="cash" /> ';
$output[] = 'Collect and Pay: <input type="radio" name="delivery" value="collect" /></td>';
$output[] = '</tr>';
From the reeceiving page:
PHP Code:
$account="";
if(isset($_POST['account'])){
$account=$_POST['account'];
$account="Yes";
}
$collect="";
if(isset($_POST['collect'])){
$collect=$_POST['collect'];
$collect="Yes";
}
$cash="";
if(isset($_POST['cash'])){
$cash=$_POST['cash'];
$cash="Yes";
}
I know that I need to change the
if(isset($_POST['cash'])) to
if(isset($_POST['delivery']))
But the problem is that ALL the options are selected as YES.
I need to somehow select:
if(isset($_POST['cash'])) AND value = YES, in order to just select one.
I know that one solution would be to change from radio button to select box, but some idiot would select ALL options.
Can anybody advice me how to solve my problem ???
Thanks,