#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Norman, OK, USA
    Posts
    12
    Rep Power
    0
    Hey all,

    Quick question.

    I've got a generic form a person can fill out. After they fill it out, the user has the option of coming back and editing various things, address, email, and which subscriptions they would like to receive.

    so here's the problem: when they come back to edit there information they can use check boxes to subscribe/unsubscribe. Which looks like this:
    <input type=checkbox name=news1 value="$user[10]"

    where $user[10] is it's placement in the mysql table. Now how do I get part to work?
    I'm sort of lost, wanting them to be able to add a list (value of 1) and delete it (NULL value).


    Thank you in advance for the help.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2000
    Location
    Indiana
    Posts
    614
    Rep Power
    16
    I'm not quit sure what you're asking, but I'll give it a shot.
    ######
    if($user[10] eq "1") {
    <input type=checkbox name=news1 value="1" checked>
    } else {
    <input type=checkbox name=news1 value="1">
    }#end if.
    ###Of course you'd have to put those in print statements.

    Then when the info comes back to the script:
    ####
    if($FORM{news1} eq "1"){$user[10]=1} else {$user[10]=0;}## or whatever you want them to equal.
    ####
    $FORM{news1} is the checkbox's parsed value.

    Is this what you wanted?
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Norman, OK, USA
    Posts
    12
    Rep Power
    0
    Oh yes. That worked out great!
    Thanks.


    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by Loki:
    Hey all,

    Quick question.

    I've got a generic form a person can fill out. After they fill it out, the user has the option of coming back and editing various things, address, email, and which subscriptions they would like to receive.

    so here's the problem: when they come back to edit there information they can use check boxes to subscribe/unsubscribe. Which looks like this:
    <input type=checkbox name=news1 value="$user[10]"

    where $user[10] is it's placement in the mysql table. Now how do I get part to work?
    I'm sort of lost, wanting them to be able to add a list (value of 1) and delete it (NULL value).


    Thank you in advance for the help.
    [/quote]

  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2000
    Location
    Indiana
    Posts
    614
    Rep Power
    16
    N/P

IMN logo majestic logo threadwatch logo seochat tools logo