I have a two checkboxes in HTML:
<input TYPE="checkbox" NAME="cc" VALUE="true"></td><td><b>Credi t
Card</b></td></tr>
<input TYPE="checkbox" NAME="cash" VALUE="true"></td><td><b>Compa ny
Check</b>
<input type=button onClick='<?php reviewpayment() ?>' value='Continue '
style='font: 10pt Arial;
The function works if I type into the function
$cc = true;
$cash = false;
<?php
function reviewpayment() {
$validity = TRUE;
if ($cc && cash) {
echo 'javascript:ale rt(" Please select ONLY ONE type of payment ");';
$validity = FALSE; }
............... ..... ?.
Therefore the function is not receiving the input from the check boxes.
How do I structure the script and HTML to send the input cc and cash in HTML
to $cc and $cash in PHP?
I have not been able to come up with a solution.
Any suggestions?
Thanks!
<input TYPE="checkbox" NAME="cc" VALUE="true"></td><td><b>Credi t
Card</b></td></tr>
<input TYPE="checkbox" NAME="cash" VALUE="true"></td><td><b>Compa ny
Check</b>
<input type=button onClick='<?php reviewpayment() ?>' value='Continue '
style='font: 10pt Arial;
The function works if I type into the function
$cc = true;
$cash = false;
<?php
function reviewpayment() {
$validity = TRUE;
if ($cc && cash) {
echo 'javascript:ale rt(" Please select ONLY ONE type of payment ");';
$validity = FALSE; }
............... ..... ?.
Therefore the function is not receiving the input from the check boxes.
How do I structure the script and HTML to send the input cc and cash in HTML
to $cc and $cash in PHP?
I have not been able to come up with a solution.
Any suggestions?
Thanks!
Comment