What is wrong with my coding, since it won't work?
$empsql("SELECT * FROM employees WHERE e_id ='$ed_id' ");
if($rows > 0) {
$empsql('UPDATE employees SET name = "'.$name.'" , description = "'.$description.'" , telephone = "'.$telephone.'" , email = "'.$email.'" WHERE e_id = "'.$ed_id.'" ');
}
else
{
$empsql("INSERT INTO employees (name,description,telephone,email) VALUES ('$name','$description','$telephone','$email') ");
}
You should really stick to the basics, because your syntax makes no sense. This code makes more sense.