Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm trying to make a sign-up form. Here is a bit my code:
PHP
public function select($query, $paramType="", $paramArray=array())
{
    $stmt = $this->conn->prepare($query);
    
    if(!empty($paramType) && !empty($paramArray)) {
        $this->bindQueryParams($stmt, $paramType, $paramArray);
    }
    
    $stmt->execute();
    $result = $stmt->get_result();
    
    if ($result->num_rows > 0) {
        while ($row = $result->fetch_assoc()) {
            $resultset[] = $row;
        }
    }
    
    if (! empty($resultset)) {
        return $resultset;
    }
}

the error is at $stmt->execute();

What I have tried:

i tried searching on Google but nothing worked
Posted
Comments
Sandeep Mewara 2-Oct-20 14:57pm    
If you debug, I believe $stmt is not setup correct. And thus the error for execute(). Would suggest to look from there. I am not sure where you have done conn setup but that is where I will look.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900