This topic is locked

Problem lookup wizard

7/20/2019 1:20:47 PM
PHPRunner General questions
E
edossa author

How can I dinamically choose which options could be available from a select picker?
global $dal;

$tblUsers = $dal->Table("member_extras");

$rs = $tblUsers->Query (" username1 ='".$_SESSION["UserName"]."'");

while ($row = db_fetch_array($rs))
{

$idleft=$row["left_free"];

$idright=$row["right_free"];
if ( $idleft >= 1 )

{

$value = "Right";

}

else if ( $idright >= 1 )

{

$value = "Left";

}
}

//****

admin 7/22/2019

You need to explain it further, not clear what "dynamically" means in this case. How it should work? What kind of dropdown box is this?

E
edossa author 7/22/2019

I need to hide or show in a lookup wizard if ($ idleft> = 1){$ value = "Right";}else if ($ idright> = 1){$ value = "Left";

E
edossa author 8/20/2019

in lookup wizard how can I do once the value is> = 1, hide that name?

admin 8/20/2019

It still doesn't make any sense.
What event you adding this code to? What are variables like $idleft, $idright and $value?
Normally, to make a dropdown box dynamic you need to either make it dependent on another dropdown box or make the use of SQL variables:

https://xlinesoft.com/phprunner/docs/sqlvariables.htm

E
edossa author 8/21/2019