I'm running XAMPP on my computer. I build an index.php and store it under xampp/htdocs/domain
folder.
Everything works fine for me. But when I click view source, I still can see through all my PHP code and especially MySQL database password. Is that normal? what should I do?
<?php
include("header.php");
//phpinfo();
if (isset($_GET['aid']) && is_numeric($_GET['aid'])) {
$aid = (int) $_GET['aid'];
} else { $aid = 1; }
// mysqli $mysqli = new mysqli($dbhost, $dbuser, $dbpassword, $dbdatabase);
$result = $mysqli->query("SELECT entries.*, categories.cat FROM entries, categories WHERE entries.cat_id = categories.id ORDER BY dateposted asc limit 0,5");
$row_12 = $result->num_r
My website is working at all. Only when I click 'view source' on the successful page, it show all my php code and MySQL statement.
To my point of view, it should show the html syntax instead. It's like the rendering is not working at all. I'm working with XAMPP v3.2.2 and I'm viewing my website using localhost/domain.