Craig H
|
| Posted: 03/26/2002, 2:34 AM |
|
hi,
i have a mysql database and am using PHP
i currently have a database with items and prices 1 to 5
depending on customers user rights i want them to be able to view a specific price only, i have this working at the moment but only at point of login, eg, soon as they login it opens this parts page with the prices, is there an easy way to just have a link to the price page which gives the details
thanks in advance
|
|
|
 |
Nicole
|
| Posted: 03/26/2002, 3:31 AM |
|
Craig,
do you store different prices in different table fields? If yes, you may display different field depending on user rights.
Add all the price fields to the form and set their type to Hidden. Put additional label type field that will be used to display price. In beforeShow event check the value of session variable UserRights and depending on it assign proper price field value to Label field
|
|
|
 |
Craig H
|
| Posted: 03/26/2002, 4:30 AM |
|
I have tried this and cant seem to get it to work, it isnt my day today!
i have created the form with more fields and have a new field called price
how do i change the price field to read from a specific field on open, im stuck :o|
sorry.....and thanks
|
|
|
 |
Nicole
|
| Posted: 03/26/2002, 5:14 AM |
|
Craig,
here is sample code for description from my previous response. It goes in Before Show event:
if (get_session("UserRights") == 1)
$fldField1 = $fldprice1;
if (get_session("UserRights") == 2)
$fldField1 = $fldprice2;
if (get_session("UserRights") == 3)
$fldField1 = $fldprice3;
where "Field1" is Label type field, "price1", "price2", "price3" fields tore different prices. Their types on CC form are Hidden.
|
|
|
 |
|