Thanks VERY much Leon,

The code I needed was:

if($DatabaseRow[0] == $EditUser["Permission"][($DatabaseRow[1])])

I may post the final code if anyone has need of it. I'm using it for a site
that has a third membership permission level; www.vistamia.com (note it's a
tasteful adult shopping site if that worries you) and needed some way for
admin to upgrade users from the standard Login permission.

Thanks again,

Nick

----------------------
Lab2 Design-Unit
URL: www.lab2.com.au
e-mail: [EMAIL PROTECTED]
----------------------



Leon Atkinson wrote:

>> I've tried fiddling with GetUserInfo() but to no avail. Any help would be
>> very much appreciated.
> 
> You're on the right track.  See my one change below.
> 
> For perspective, look at the definitino of GetUserInfo inside
> standard_library.  Look for the part that pulls permissions out of the
> database.
> 
>> 
>> ------the script so far--------------->
>> 
>> /* User Permission Field. */
>> print("<TR>\n");
>> print("<TD>User Permission</TD>\n");
>> print("<TD>");
>> print("<SELECT NAME=\"user_permission\">\n");
>> 
>> $Query = "SELECT ID, Name ";
>> $Query .= "FROM permission  ";
>> $DatabaseResult = mysql_query($Query, $DatabaseLink);
>> while($DatabaseRow = mysql_fetch_row($DatabaseResult))
>> {
>> print("<OPTION VALUE=\"$DatabaseRow[0]\"");
>> if($DatabaseRow[0] == $DatabaseRow[2] )
> if($UserInfo["Permission"][($DatabaseRow[1])])
>> {
>> print(" SELECTED");
>> }
>> print(">" . prepareText($DatabaseRow[1]) . "\n");
>> }
>> print("</SELECT>");
>> print("</TD>\n");
>> print("</TR>\n");
>> 
>> ---------------------------------------+
> 
> 
> 
> 
> ------------------------------------------------------------
> To subscribe:    [EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> Site:            http://www.working-dogs.com/freetrade/
> Problems?:       [EMAIL PROTECTED]
> 
> 



------------------------------------------------------------
To subscribe:    [EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Site:            http://www.working-dogs.com/freetrade/
Problems?:       [EMAIL PROTECTED]

Reply via email to