Hello friends,

I have a table called rates.

It contains the following

id
membership_id
title
desc
amount
term
term_c
automaic

It has the following values

9 4 Shipping & handling Only for subscribed members 9.95 0 D 0


8 4 LifeTime Subscription LifeTime Supply 79 1 Y 1

To make this short i have 2 values in that table

1. Shipping and handling
2. Lifetime subscription

I want to display these things based on option.


That is we have 2 memberships with id 3 and 4

3 for free membership
4 for lifetime membership

If the member have free membership i need to display Lifetime subscription in the drop down box.

If the member have lifetime membership then only shipping and handling option.

This is the code i have.

<td><select name="rate_id" class="select" id="rate_id" onChange="document.user_form.submit();">
              <option value="NA">--- Select Membership Rate---</option>
              <?php if ($raterow !=0):?>
              <?php foreach($raterow as $rrow):?>
              <?php $selected = ($rrow['id'] == post('rate_id')) ? " selected=\"selected\"" : "";?>
              <option value="<?php echo $rrow['id'];?>"<?php echo $selected;?>><?php echo $rrow['title']."(".$setup->set['cur_symbol'].$rrow['amount'].$setup->set['currency']. " Paypable Every ". $rrow['term']." ".getTerm($rrow['term_c']).")";?></option>
              <?php endforeach;?>
              <?php unset($rrow);?>
              <?php endif;?>
            </select></td>

Please anyone post solution

Where the "option value" is that says N/A you should have a current user line so the code knows what type of subscriber you have, then the code will know what option to give.

Make sense?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.