Hi Ben,
THANKS FOR YOUR REPLY...
what and how much portion is to be removed?? plz be specific... i am newbie... when i remove if loop it gives me blank page when i click on edit.... or tell me what is to be written in place of is_numeric... if i want user to be enter characters only..
P.S i removed
if (isset($_POST['submit']))
{
// confirm that the 'id' value is a valid integer before getting the form data
if (is_string($_POST['signum']))
{
// get form data, making sure it is valid
$signum =$_POST['signum'];
$name = mysql_real_escape_string(htmlspecialchars($_POST['name']));
$emp_id = mysql_real_escape_string(htmlspecialchars($_POST['emp_id']));
// check that firstname/lastname fields are both filled in
if ($name == '' || $emp_id == '')
{
// generate error message
$error = 'ERROR: Please fill in all required fields!';
//error, display form
renderForm($signum, $name, $emp_id, $error);
}
else
{
// save the data to the database
mysql_query("UPDATE EMP SET name='$name', emp_id='$emp_id' WHERE signum='$signum'")
or die(mysql_error());
// once saved, redirect back to the view page
header("Location: view.php");
}
}
else
{
// if the 'id' isn't valid, display an error
echo 'Error!';
}
}
PLEASE EDIT THE SCRIPT FOR ME AND PASTE IT OVER HERE IF POSSIBLE...