CAn you Help me up with this one? my add button is nothin ok . i mean my add button can;t submit
here is my codeL:
<?
session_start();
include("../inc/config.php");
$resultQuery=mysql_query("SELECT * FROM tblchildren");
$sql=mysql_query("SELECT * FROM tblemployee WHERE strEmployeeTIN='$tinID'");
$sqlRow=mysql_fetch_array($sql);
?>
<?
include ("../inc/config.php");
$sqlRet=mysql_query("SELECT * FROM tblemployee where strEmployeeTIN='$tinID'");
$sqlRetFetch=mysql_fetch_array($sqlRet);
?>
<?
$Edit=$_POST['Edit'];
if($Edit){
include("../inc/config.php");
$query="update tblchildren set strNameOfChildren='$txtNameofChildren', strPlaceOfBirth='$txtPlaceofBirth', dtmDateOfBirth='$txtDateofBirth' where id='$txtuid'";
mysql_query($query) or die(mysql_error());
echo '<script>alert("Children Information Successfully Updated")</script>';
echo '<meta http-equiv="refresh" content="0;url=childreninfo2.php">';
}
?>
<?
$Add=$_POST['Add'];
if($Add){
include("../inc/config.php");
$qry=mysql_query("SELECT * FROM tblchildren WHERE strNameOfChildren='$txtNameofChildren' AND strPlaceOfBirth='$txtPlaceofBirth' AND dtmDateOfBirth='$txtDateofBirth'") or die(mysql_error());
$qryRow=mysql_num_rows($qry);
if ($qryRow==1) {
echo $qryRow;
echo '<script>alert("Already exists!")</script>';
echo '<script>history.back()</script>';
} else {
$query="INSERT INTO tblchildren(strNameOfChildren,strPlaceOfBirth,dtmDateOfBirth) VALUES('$txtNameofChildren','$txtPlaceofBirth','$txtDateofBirth')";
mysql_query($query) or die(mysql_error());
echo '<script>alert("Children Information Successfully Added")</script>';
echo '<meta http-equiv="refresh" content="0;url=childreninfo2.php">';
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
I Got error w/c is unknown column can anyone redebug this tnx and trnx
<?
session_start();
include("../inc/config.php");
$resultQuery=mysql_query("SELECT * FROM tbleligibilites");
$sql=mysql_query("SELECT * FROM tblemployee WHERE strEmployeeTIN='$tinID'");
$sqlRow=mysql_fetch_array($sql);
?>
<?
include ("../inc/config.php");
$sqlRet=mysql_query("SELECT * FROM tblemployee where strEmployeeTIN='$tinID'");
$sqlRetFetch=mysql_fetch_array($sqlRet);
?>
<?
$Edit=$_POST['Edit'];
if($Edit){
include("../inc/config.php");
$query="UPDATE tbleligibilites SET strTitleOfExamination='$txtTitleOfExamination', dtmDateOfExam='$txtDateOfExam', strPlaceOfExamination='$txtPlaceOfExamination', strRating='$txtRating', dtmLicenseRelease='$txtLicenseRelease', strLicense='$txtLicense' WHERE id='$txtuid'";
mysql_query($query) or die(mysql_error());
echo '<script>alert("Civil Service Eligibility Successfully Updated")</script>';
echo '<meta http-equiv="refresh" content="0;url=editcivilservice.php?tinID='.$tinID.'">';
}
?>
<?
$Add=$_POST['Add'];
if($Add){
include("../inc/config.php");
$qry=mysql_query("SELECT * FROM tbleligibilites WHERE strTitleOfExamination='$txtTitleOfExamination' AND dtmDateOfExam='$txtDateOfExam' AND strPlaceOfExamination='$txtPlaceOfExamination' AND strRating='$txtRating' AND dtmLicenseRelease='$txtLicenseRelease' AND strLicense='$txtLicense'") or die(mysql_error());
$qryRow=mysql_num_rows($qry);
if ($qryRow==1) {
echo $qryRow;
echo '<script>alert("Already exists!")</script>';
echo '<script>history.back()</script>';
} else {
$query="INSERT INTO tblformaleducation(strEmployeeTIN,strTitleOfExamination,dtmDateOfExam,strPlaceOfExamination,strRatin g,dtmLicenseRelease,strLicense) VALUES ('$tinID','$txtTitleOfExamination','$txtDateOfExam','$txtPlaceOfExamination','$txtRating','$txtLicen seRelease','$txtLicense')";
mysql_query($query) or die(mysql_error());
echo '<script>alert("Civil Service Eligibility Successfully Added")</script>';
echo '<meta http-equiv="refresh" content="0;url=editcivilservice.php?tinID='.$tinID.'">';
Career service / ra 1080(board/bar) under special laws/ces/csee</strong></div></td>
<td><div align="center"><strong>rating</strong></div></td>
<td><div align="center"><strong>date of examination<font style="font-size:9px; text-transform:lowercase; font-style:italic; color:#0000FF"></font></strong></div></td>
<td><div align="center">
<strong>place of examination</strong></div></td>
<td> </td>
<td colspan="2"><div align="center"><strong>License</strong></div> <div align="center"><strong>(if applicable)</strong></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
</tr>
<?
include ("../inc/config.php");
$sqlAdmin=mysql_query("SELECT * FROM tbleligibilites WHERE strEmployeeTIN='$tinID'");
Bookmarks