|  | Posted by Ben Allen on 06/15/86 11:20 
Kimmo Laine wrote:> "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") {...
 >
 >
 >
 Brilliant thanks, I knew it had to be some simple newbie mistake, thanks
 once again.
 
 Ben
  Navigation: [Reply to this message] |