xxxxxxxxxx
public function viewLandlord($username)
{
$database = new DatabaseHandler();
$database->query('SELECT * FROM landlordtbl WHERE username=:username');
$database->bind(':username',$username);
$database->execute();
return $row = $database->resultset();
}
xxxxxxxxxx
<script>
document.cookie = "js_var = " + This is used to chang js to php
</script>
<?php
$php_var= $_COOKIE['js_var'];
echo $php_var;
?>
xxxxxxxxxx
<?php
$php_var = "This is used to change php values to js";
?>
<script>
var js_var = '<?php echo $php_var ;?>';
document.write(js_var);
</script>