I have the following web page which has a script pointing to an index.php page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Daily Checks</title>
<style type="text/css">
#form1 {
text-align: left;
width: 550px;
margin-left: 0px;
}
</style>
</head>
<body style="margin-left: 350px; margin-top: 60px">
<form name="dailycheck" action="insert.php" method="post" onSubmit="return validate()">
<table style="width: 81%; text-align: left">
<tr>
<td style="border-style: solid; border-width: 1px; width: 285px">Called 512-483-9014</td>
<td>
<input name="Radio1" name="IVR1Pass" type="radio" />Pass
<input name="Radio1" name="IVR1Fail" type="radio" />Fail
</td>
</tr>
<tr>
<td style="border-style: solid; border-width: 1px; width: 285px">Called 512-381-0115</td>
<td>
<input name="Radio1" name="IVR2Pass" type="radio" />Pass
<input name="Radio1" name="IVR2Fail" type="radio" />Fail
</td>
</tr>
<tr>
<td style="border-style: solid; border-width: 1px; width: 285px">
Called 512-458-3750</td>
<td>
<input name="Radio1" name="FaxPass" type="radio" />Pass
<input name="Radio1" name="FaxFail" type="radio" />Fail
</td>
</tr>
<tr>
<td style="border-style: solid; border-width: 1px; width: 285px">Checked VLPortal for Calls since Midnight</td>
<td>
<input name="Radio1" name="VLPortalPass" type="radio" />Pass
<input name="Radio1" name="VLPortalFail" type="radio" />Fail
</td>
</tr>
</table>
<table style="width: 81%; text-align: left">
<tr>
<td style="width: 285px; border-left-style: solid; border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-style: solid; border-top-width: 1px;">
Checked Printer Capture Reports since Midnight</td>
<td>
<input name="Radio1" name="PTRCapturePass" type="radio" />Pass
<input name="Radio1" name="PTRCaptureFail" type="radio" />Fail
</td>
</tr>
<tr>
<td style="border-style: solid; border-width: 1px; width: 285px">
Checked Inbound Fax Mailbox</td>
<td>
<input name="Radio1" name="FaxMailboxPass" type="radio" />Pass
<input name="Radio1" name="FaxMailboxFail" type="radio" />Fail
</td>
</tr>
<tr>
<td style="border-style: solid; border-width: 1px; width: 285px">
Checked backup status of Voicelogger Waves</td>
<td>
<input name="Radio1" name="WavbackupPass" type="radio" />Pass
<input name="Radio1" name="WavbackupFail" type="radio" />Fail
</td>
</tr>
<tr>
<td style="border-style: solid; border-width: 1px; width: 285px">
Check Music On Hold</td>
<td>
<input name="Radio1" name="MusicOnHoldPass" type="radio" />Pass
<input name="Radio1" name="MusicOnHoldFail" type="radio" />Fail
</td>
</table>
<p style="margin-left: 80px; width: 123px; height: 0px;"><br />
<input name="Submit" type="submit" value="Formsubmit1" style="text-align: center; margin-left: 0px" /></p>
</form>
</body>
</html>
Here is the index.php:
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=windows-1252" http-equiv="Content-Type" />
<title>Untitled 1</title>
</head>
<?php
$con = mysql_connect("10.2.1.40","xx","xxxxxxx");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("my_db", $con);
$sql="INSERT INTO dailychecks (xxxxxxxxxx)
VALUES
('$POST[xxxxxxx]','$POST[xxxxxxxx]','$_POST[xxxx]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "1 record added";
mysql_close($con)
?>
<body>
</body>
</html>
What I dont know how to do is where the xxxx's are. In other words, how do I pass the variable of either pass/fail to the database? Do I have to have a $_post for both conditions or just one? Any help would be appreciated.
Thank you