This is the message form:
$funcname->name= htmlentities($_POST['name']); $funcname->insert();
it will be an insert function in the funcname class that will insert data into a column named name
$this->conn->beginTransaction(); $stmt = $this->conn->prepare("INSERT INTO nameTBL (name) values (:name)"; $stmt->bindParam(':name', $this->name, PDO::PARAM_INT); if ($stmt->execute()) { $this->conn->commit();
Now the question is that I set PDO :: PARAM_INT, which should not allow characters, but only integers, why can I send text to the database (table)?
is there any way i can severely restrict the data type on bindParam here.
early.
source share