Hello, there.
I must select 1 or 0 according to a checked and/or unchecked checkbox.
The HTML holding the form is the following:
... and then, in
I have the following:
...in order to set $manuf to 1 or 0 whether the checkbox is enabled or not.
But the PHP interpreter says
Parse error: parse error in /var/ on line 29
Line 29 is
What the problem is?
I can't figure out where the error is.
Perhaps that kind of if...else is not the best way to ask for a checkbox value...
Thanks in advance Arlequín
arlequin@montevideo.com.uy
I must select 1 or 0 according to a checked and/or unchecked checkbox.
The HTML holding the form is the following:
Code:
<form name="frm_cli" action="save_cli.php" method="POST">
. . . . .
. . . . .
<input type="checkbox" name="cli_manuf" value="checkbox">
. . . . .
. . . . .
</form>
... and then, in
Code:
save_cli.php
Code:
if ($cli_manuf) {
$manuf=1;
else {
$manuf=0;
}
...in order to set $manuf to 1 or 0 whether the checkbox is enabled or not.
But the PHP interpreter says
Parse error: parse error in /var/ on line 29
Line 29 is
Code:
else {
What the problem is?
I can't figure out where the error is.
Perhaps that kind of if...else is not the best way to ask for a checkbox value...
Thanks in advance Arlequín
arlequin@montevideo.com.uy