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
$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”>’;
}
}
?>
<?php
$Delete=$_POST[‘Delete’];
if($Delete){
include(“../inc/config.php”);
$query=”delete from tblchildren where strEmployeeTIN=’$txtstrEmployeeTIN'”;
mysql_query($query)or die(mysql_error());
echo ‘<script>alert(“Children Information Successfully Deleted”)</script>’;
echo ‘<meta http-equiv=”refresh” content=”0;url=childreninfo2.php”>’;
}
?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “
<html xmlns=”
<head>
<meta http-equiv=”content-type” content=”text/html; charset=utf-8″ />
<title>Personal Information Sheet</title>
<meta name=”keywords” content=”” />
<meta name=”description” content=”” />
<link href=”../style.css” rel=”stylesheet” type=”text/css” media=”screen” />
<script language=”javascript” type=”text/javascript” src=”../inc/datetimepicker.js”></script>
<script type=”text/javascript”>
// Popup window code
function newPopup(url) {
popupWindow = window.open(
url,’popUpWindow’,’resizable=no,scrollbars=no,toolbar=no,menubar=no,location=no,directories=no,status=no’)
}
</script>
</head>
<body>
<div align=”center” class=”post”><img src=”../images/logo.png”></div><br>
<!– start sidebar –>
<div id=”sidebar”>
<div id=”logo”>
</div>
<div id=”widgets”>
<div id=”widgets-top”></div>
<ul>
<li>
<h2 style=”color:#FFF;text-decoration:overline;font-size:16px”>Main Menu</h2>
<br />
<? include (“../inc/editmenu.php”); ?>
<h2> </h2></li>
</ul>
</div>
</div>
<!– end sidebar –>
<!– start page –>
<div id=”page”>
<div id=”search”>
<form name=”form1″>
<fieldset>
<div style=”margin-left:220px;”><marquee><font color=”#FF0000″ size=”2″><b><blink>NEWS!</blink> </b></font><a href=”_blank” style=”text-decoration: none”><font color=”#FFFFFF”>www.denr.gov.ph</font></a></marquee></div>
</fieldset>
</form>
</div>
<!– start content –>
<div id=”content”>
<h1 class=”pagetitle”>Edit/Update</h1>
<div class=”post”>
<div class=”ct”>
<div class=”l”>
<div class=”r”></div>
Data Info of: <?php echo strtoupper($sqlRetFetch[‘strLastName’]); ?>, <?php echo strtoupper($sqlRetFetch[‘strFirstName’]); ?> <?php echo strtoupper($sqlRetFetch[‘strMiddleName’]); ?> <br>Employee TIN:<? echo $sqlRetFetch[‘strEmployeeTIN’];?><br>
<? echo $msg; ?></h2>
</div></div>
<div class=”entry”>
<fieldset>
<legend style=”font-weight:bolder; color:#FFFFFF”>Add New Children Information
</legend>
<form name=”frmReg” method=”post” action='<? $PHP_SELF; ?>’>
<table width=”100%” align=”center”>
<tr>
<td align=”right”><div align=”justify”><strong>NAMe of children</strong></div></td>
<td><div align=”justify”>
<input type=”text” name=”txtNameofChildren”>
</div></td>
</tr>
<tr>
<td width=”101″ align=”right”><div align=”justify”><strong> birthplace</strong></div></td>
<td width=”168″><div align=”justify”>
<input type=”text” name=”txtPlaceofBirth”>
</div></td>
</tr>
<tr>
<td align=”right”><div align=”justify”><strong>date of birth</strong></div></td>
<td><div align=”justify”>
<input name=”txtDateofBirth” type=”text” maxlength=”10″>
<font style=”font-size:9px; text-transform:lowercase; font-style:italic; color:#0000FF”> (yyyy/mm/dd)</font></div></td>
</tr>
<tr>
<td colspan=”2″ align=”center”><div align=”justify”>
<input type=”submit” name=”Add” value=”Add”>
</div></td>
</tr>
</table>
</form>
</fieldset>
<br><? echo $message; ?><br>
<? $admin=$
<fieldset><legend style=”font-weight:bolder; color:#FFFFFF”>Edit/Delete Administrator Account</legend>
<table width=”100%” align=”center”>
<tr>
<td><div align=”center”><strong>name of children</strong></div></td>
<td><div align=”center”><strong>birthplace</strong></div></td>
<td><div align=”center”><strong>date of birth</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 tblchildren”);
while ($sqlAdminRow=mysql_fetch_array($sqlAdmin)) {
?>
<form name=”frmEdit” method=”post” action='<? $PHP_SELF; ?>’>
<tr>
<input type=”hidden” name=”txtstrEmployeeTIN” value=”<? echo $sqlAdminRow[‘strEmployeeTIN’]; ?>”>
<td><div align=”center”>
<input type=”text” name=”txtNameofChildren” value=”<? echo $sqlAdminRow[‘strNameOfChildren’]; ?>”>
</div></td>
<td><div align=”center”>
<input type=”text” name=”txtPlaceofBirth” value=”<? echo $sqlAdminRow[‘strPlaceOfBirth’]; ?>”>
</div></td>
<td><div align=”center”>
<input type=”text” name=”txtDateofBirth” value=”<? echo $sqlAdminRow[‘dtmDateOfBirth’]; ?>”>
</div></td> <td><div align=”center”>
<input type=”submit” name=”Edit” value=”Edit”>
</div></td>
<td><div align=”center”>
<input type=”submit” name=”Delete” value=”Delete”>
</div></td>
</tr>
</form>
<? } ?>
</table>
</fieldset>
</div>
<div class=”cb”>
<div class=”l”>
<div class=”r”></div>
</div>
</div>
</div>
<div class=”post”>
</div>
</div>
<!– end content –>
</div>
<!– end page –>
<div id=”footer”>
<p>Copyright © 2010 All Rights Reserved.<br />
Design by <a href=”http:///”>M.I.S.D.</a> Web Developer Team</p>
</div>
<div align=”right”>
<?
echo “(Host) IP Address: <strong>$server</strong> – “;
echo “(Remote) IP Address: <strong>$domain</strong> – “;
echo “(Local-Machine) IP Address: <strong>$domain1</strong>”;
?>
</div>
</body>
Can anyone help me up with this one??? tnx and tnx??:p