<?php
	session_start();
	include"../../connect/db.php"; 
 ?>  
<?php
	if( isset($_POST['purpose']) ){

		$purpose = mysqli_real_escape_string($con,$_POST['purpose']);
		$msg = mysqli_real_escape_string($con,$_POST['msg']);

		$sql = mysqli_query($con,"UPDATE errormsg SET msg = '$msg' WHERE purpose = '$purpose' ");

		if( $sql ){
			echo "success";
		}
		else{
			echo mysqli_error($con) ;
		}
	}
	
?>