|
Posted by Geoff Berrow on 12/30/05 13:20
Message-ID: <8X0tf.2508$L53.1650@trndny07> from digit contained the
following:
>Can you please clarify for me, in your example 'style 1' and 'style 2' are
>database columns and are what I named the check boxes on my registration
>form?
No you'd have a single database column called style (or whatever you
like. In it you store a reference to the style chosen. It can be a
reference such as has been suggested (which is possible the most
flexible option or it can simply be the name of the style sheet.
I wouldn't use checkboxes. Checkboxes are for multiple choices. You
only want the respondent to return one choice. I'd suggest either a
select drop down box or radio buttons.
> And $choice arghhh, I can't seem to find where to plug that one in on
>the form!
It doesn't. When you have successfully stored the stylesheet choice in
the database presumably you will have some form of log in system. When
the user logs in, fetch the value from the data base.
If you don't have a log in system you can't do this. Your only other
option is to set a cookie on the users machine. The downside of this is
that the user may have cookies disabled. In which case, tough, they'd
have to set their preferred styles each session.
Whichever method you choose, I'd store the choice in a session variable
for the duration of the visit.
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
Navigation:
[Reply to this message]
|