Posted by Kimmo Laine on 10/24/33 11:20
"Ben Allen" <"ben.allen"@\"your.tonsils\"btinternet.com> kirjoitti
viestissδ:da8n4g$6ta$1@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com...
>I have the following code which connects to a database and sets the value
>of counter to '0' and the date to be either the current date or a users own
>date. The database connects via an included script as this is a
>contribution for OSCommerce. Each section (the set date today and set date
>custom) works fine by itself (with the other half commented out) but I cant
>make it so the option is available via radio buttons, what am I doing
>wrong?
>
> if ($setdate="true") {...
> if ($setdate="false") {...
== is the comparison operator, = is assignment. When you assign the string
"true" to $setdate, of course it is true. Instead you need to compare
them...
if ($setdate=="true") {...
if ($setdate=="false") {...
--
"I am pro death penalty. That way people learn
their lesson for the next time." -- Britney Spears
eternal.erectionN0@5P4Mgmail.com
Navigation:
[Reply to this message]
|