Data missing in view field

I looked at the code i can see an issue so unable to find out why the data is now showing

Code

public function updateEmployee(){
	if($_POST['empId']) {	
		$updateQuery = "UPDATE ".$this->empTable." 
		SET name = '".$_POST["name"]."', email = '".$_POST["email"]."', phone = '".$_POST["phone"]."', type = '".$_POST["type"]."', source = '".$_POST["source"]."', date = '".$_POST["date"]."', cost = '".$_POST["cost"]."', commission = '".$_POST["commission"]."', assigned = '".$_POST["assigned"]."', status = '".$_POST["status"]."', notes = '".$_POST["notes"]."'
		WHERE id ='".$_POST["empId"]."'";
		$isUpdated = mysqli_query($this->dbConnect, $updateQuery);		
	}	
}

There’s nothing in the posted code about a ‘view field’ or having anything to do with a form of the word ‘view’. Can you provide a better description of what result you are getting and what result you expect? I suspect your statement of the problem is probably one of the following: the update query - is not running, is not saving the data, is producing a php error, or is producing an sql error. Using Google’s online Language translator may be of help in communicating with us.

Next, do NOT put external, unknown, dynamic values directly into an sql query statement. Use a prepared query and switch to the much simpler PDO database extension.

Sponsor our Newsletter | Privacy Policy | Terms of Service