I'm trying to write a SQL query into PHP variable and then trying write in a PHP file. When I trigger the code, it gives me "Object of class mysqli could not be converted to string in " error.
Here is my variable.
Thanks for your help
$txt = " $conn = mysqli_connect('shareddb1c.hosting.stackcp.net','egitimde-adresim-323044d1','','egitimde-adresim-323044d1');
mysqli_set_charset($conn, 'utf8');
$only_query = 'SELECT * FROM anaokulu_veritabani WHERE anaokulu_id = 63';
$yayinda_query = mysqli_query($conn, $only_query);
if($yayinda_array = mysqli_fetch_array($yayinda_query)) {
if($yayinda_array[online] == 0 ) {
header('Location:http://www.egitimdeadres.com');
}
}";