This question already has an answer here:
- Can I mix MySQL APIs in PHP? 4 answers
As the title suggest, I've tried different set-ups and had several other issues.
$conn = new mysqli("localhost","root","root","site_db");
foreach($webdesigns as $designer){
$whmcs_id = $designer['id'];
$email = $designer['email'];
$portfolio = json_encode($designer['designs'],JSON_FORCE_OBJECT);
$stmt = $conn->prepare("INSERT INTO partners (whmcs_id,email,portfolio) VALUES (?, ? , ?)");
$stmt->bindParam(1, $whmcs_id);
$stmt->bindParam(2, $email);
$stmt->bindParam(3, $portfolio);
echo $stmt->execute();
}
</div>