Okay my form is in an html file. here is the form part.
[code]
<form action=”WellnessSubmit.php” method=”post”>
the php file…
[code]
<?php
require(“config.php”);
if($_GET[‘action’] == ‘post’)
{
if($_POST[’employeeid’] == ” || $_POST[‘date’] == ” || $_POST[‘activity’] == ” || $_POST[‘miles’] == ”)
{
//if everything is not filled in than prints out error message
echo error(“blank”);
exit;
}
$conn->Execute(“INSERT INTO Activity_Log
(Employee ID, Date, Activity, Miles) VALUES(‘$_employeeid’, ‘$_date’, ‘$_activity’, ‘$_miles’) “)
or die(ADODB_error());
}
function error($error)
{
//if error is equal to blank
if($error == ‘blank’)
{
echo “<b>Please fill in all the required fields before submitting</b>”;
}
}
?>
config php file
[code]<?php
$db_conn = new COM(“ADODB.Connection”);
$connstr = “DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=”. realpath(“./Copy of HR Employee Wellness Program.mdb”).”;”;
$db_conn->open($connstr);
?>
Now here is the continuous error i get when i try to submit
[code]Notice: Undefined index: action in F:InetPubwwwrootEmployeeWellnessProgramWellnessSubmit.php on line 5
?
I have not the slightest clue as to why i’m getting this error. Any suggestions would be greatly appreciated!! I have to have this done by the time i leave work tonight? in about 3.5 hours or so