Forum Moderators: coopster
// Initialize the DB Connection
$logininfo = explode("\\",$_SERVER['REMOTE_USER']);
$domainname = $logininfo[0];
$username = $logininfo[1];
$con = new COM("ADODB.Connection");
$rs = new COM("ADODB.Recordset");
$conn = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=d:/data/gradschool/ga.mdb"; //".realpath("../ga.mdb");
$con->open($conn);
$appid = $_GET['appid'];
$sql = "UPDATE APP SET app_assigned='1' WHERE app_id=$appid";
$rs = $con->Execute($sql);
$sql = "INSERT INTO req (req_user_name, req_applicant, req_user_email) VALUES ('$username', $appid, '$useremail')";
$rs = $con->Execute($sql);
include("aas_list_req.php");
?>
Another tip, a good way to debug is to echo your query like this
echo($sql); copy and paste that into a command query in your database and see if it works. I cannot tell you how many times I have had an error in the way wrote my query and not the code. You'll notice I put {} around variables in '' but also I put an extra ; in the string because you need your query to have a semicolon in it. Let me know if you need anymore help.