run a php function before page load February 05, 2022, 02:16:22 PM i want to let an agency able to view all his own records and his agents records, in table Where condition:failed:Quote"agent='". USER_NAME . "' $opt agency = '". get_active_user('agency') . "'"working:Quote"agent='". USER_NAME . "' or agency = '". get_active_user('agency') . "'"i am not able to set a variable $opt before page load... please advice, thanks Quote Selected
Re: run a php function before page load Reply #1 – February 06, 2022, 09:43:53 AM @andrewmak where are you getting the value you want to assign to the $opt variable? Quote Selected
Re: run a php function before page load Reply #2 – February 07, 2022, 03:50:08 AM hi, i am not sure if i can use a php variable in the mysql commandi am looking for way to set the variable $opt when page load.for example, if user role = agency, then i set $opt='or', else $opt='and'thanks in advance Quote Selected