I am wanting to change the permisisons of a user as they proceed through my site. I have set up a exam based site and as they complete exam 1 with 100% I want to grant them access to exam 2 etc…
I have tried the code below but again I am novice so don’t laugh.
Code:
<?php $con = mysql_connect("server.com","username","pass"); if (!$con) { die('Could not connect: ' . mysql_error()); } $num3=$loggedInUser->user_id; mysql_select_db("PWU_pleasureway_com", $con); mysql_query("UPDATE memb_user_permission_matches SET permission_id=3 WHERE user_id=$num3");echo 'done!'; mysql_close($con); ?>Any suggestions would be appreciated.
John