I cannot seem to get a variable passed to my bash script from php. $uaddress and $upassword come up empty no matter what I try.
******<
You need to pass the variables as arguments to the shell script, and the shell script has to read its arguments.
So in PHP:
$useraddress = escapeshellarg('mytestuser@tpccmedia.com');
$upassword = escapeshellarg('test1234');
$addr = shell_exec("sudo /home/tpccmedia/cgi-bin/member_add_postfixadmin $useraddress $upassword 2>&1");
and in the shell script:
useraddress=$1
upassword=$2