So I have a bit of a problem, I'm EXTREMELY new to PHP and I'm having a problem updating a string on my database, It's throwing out this error: Catchable fatal error: Object of class mysqli could not be converted to string in C:\xampp\htdocs......\ban.php on line 11
Here is the source:
<?php
$servername = "localhost";
$username = "example";
$password = "example";
$name = "Brendan";
// Create connection
$conn = new mysqli($servername, $username, $password);
$query = mysqli_query("$conn, UPDATE * wp_oxygenpurchaseusers
SET user_url = '2'
WHERE display_name = $name");
while ($row = $result->fetch_assoc()) {
echo $row['classtype']."<br>";
}
?>
Thanks in advance for everyone's help :)