Forum Moderators: coopster
// Error Reporting is ON !
error_reporting(E_ALL^E_NOTICE);
ini_set('display_errors', '1');
// 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");
?>
Can any one help me plz...
I tried by giving manual values at the username and useremail it worked it inserted all the values.But its not working with the format that i given in the code.
I think the error may be this..I am extracting the values from the two tables,appid from one table and username,useremail from other table.Can't we extract the values more than one table.Is it correct......? If this is the problem how can i extract the values from the two tables
// Error Reporting is ON !
error_reporting(E_ALL^E_NOTICE);
ini_set('display_errors', '1');
// 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);
$username = $_GET['username'];
$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) VALUES ('$username', $appid)";
$rs = $con->Execute($sql);
include("aas_list_req.php");
?>
I changed the code but still I am not able to insert the values.How can I pull the usernames in to this table.I want to pull the username from the list of users in the table.In this code username should be pulled from the list
When they selects, the user who selected and the mail and the applied # of the one who filled the form should store into a table.
I have a table with the users who can see the applied people.I want to get the username and email from that table.AppId from the table who filled the form.
If you want I can send you the tables..